CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 10/8/2007 2:41:21 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 42 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
ANGanley
Asp.Net User
interop word10/8/2007 2:41:21 PM

0/0

I am creating a mail merge document using the following code extract.

  ' Create a data source at C:\template.doc that contains the field data.         wrdDoc.MailMerge.CreateDataSource(Name:="C:\template.doc", _      HeaderRecord:="FirstName, LastName, Address, Postcode, email) 

I then use the following code to,

 ' Creates a new word document & inserts the merged data.            wrdSelection.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft            wrdMergeFields = wrdMailMerge.Fields            wrdMergeFields.Add(wrdSelection.Range, "FirstName")            wrdSelection.TypeText(" ")            wrdMergeFields.Add(wrdSelection.Range, "LastName")            wrdSelection.TypeParagraph()            wrdMergeFields.Add(wrdSelection.Range, "Address")            wrdSelection.TypeParagraph()            wrdMergeFields.Add(wrdSelection.Range, "Postcode")wrdSelection.TypeParagraph()            wrdMergeFields.Add(wrdSelection.Range, "email")   This then sets up the mereged data as follows then populates the fields. 

?FirstName? ?LastName?

?Address?

?Postcode?

?email?

 Here?s the question.I need to modify the code so that the user is able to select & use their own templates. Eg. User1?s template migth look like.  

?FirstName? ?LastName?

?Address?

?Postcode?

 

User2?s template might look like.

 

?FirstName? ?LastName?

?Address?

?email?

 

Is there an option eg wrd.selection ?????? that I can use to only populate the fields I want.

 

I have tried.

 wrdMergeFields.Add(wrdSelection.Range, "?FirstName?")                    wrdSelection.TypeText(" ")                    wrdMergeFields.Add(wrdSelection.Range, "?LastName?")                    wrdSelection.TypeParagraph()                    wrdMergeFields.Add(wrdSelection.Range, "?Address?")                    wrdSelection.TypeParagraph()                    wrdMergeFields.Add(wrdSelection.Range, "?Postcode?")                    wrdSelection.TypeParagraph()                    wrdMergeFields.Add(wrdSelection.Range, "?email?") 

but it doed not work.

  

 

Mikhail Arkhipo
Asp.Net User
Re: interop word10/8/2007 4:09:24 PM

0/0

Try VSTO forums here: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=16&SiteID=1


Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Microsoft Visual C++ .NET 2003: Kick Start Authors: Kate Gregory, Pages: 318, Published: 2003
Visual Studio Tools for Office: Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath Authors: Eric Carter, Eric Lippert, Pages: 992, Published: 2006
Professional VSTO 2005: Visual Studio 2005 Tools for Office Authors: Alvin Bruney, Pages: 313, Published: 2006
The Microsoft Office Web Components Black Book with .Net Authors: Alvin J. Bruney M. V. P., Pages: 568, Published: 2005
Windows Powershell in Action Authors: Bruce Payette, Pages: 576, Published: 2007
Pro SQL Server 2005 Integration Services: Intergration Services Authors: James Wightman, Pages: 548, Published: 2007
Professional C# 2008 Authors: Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Pages: 1782, Published: 2008
Microsoft .NET Development for Microsoft Office Authors: Andrew Whitechapel, Pages: 504, Published: 2004
Microsoft Visual C# 2005 Unleashed Authors: Kevin Hoffman, Pages: 692, Published: 2006
Office 2003 XML: Integrating Office with the Rest of the World Authors: Evan Lenz, Simon St. Laurent, Mary McRae, Pages: 576, Published: 2004

Web:
Working with the Office XP Primary Interop Assemblies Interop.Word.dll. This indicates that the Word PIA is being used instead of forcing Visual Studio .NET to create its own COM interop assembly. ...
Microsoft.Office.Interop.Word Namespace ApplicationEvents4_Event, Events interface for Microsoft Word 2003 Microsoft. Office.Interop.Excel.Application object events. ...
Interop Word & VB problem - .NET VB Interop Word & VB problem. Get answers to your questions in our .NET VB forum.
Programming Word from .NET | O'Reilly Media Apr 18, 2006 ... You can now access, create, and manipulate Word documents using the Microsoft. Office.Interop.Word .Application object as well as the ...
Easily utilise Microsoft Word functionality in your .NET ... Dim word As New Microsoft.Office.Interop.Word.Application Dim doc As Microsoft. ..... Interop.Word' doesn't contain any public member or cannot be found. ...
Microsoft.Office.Interop Word/Excel Manipulation - vbnet Aug 19, 2008 ... Interop.Word.Application Get Return Me._worApp End Get Set(ByVal value As ... Interop.Word.Document) Me._worDoc = value End Set End Property ...
word interop assembly not loading - .NET C# word interop assembly not loading. Get answers to your questions in our .NET C# forum.
Mono Community - Using Microsoft Interop Word DLL in Mono Jul 15, 2008 ... We’are facing problem in using Microsoft Word Interop DLL in Linux with Mono. Before explaining the problem, is it possible to use Word ...
ASP.NET 2.0 Word interop assembly Word export/import functionality using the Interop Assembly and without ... To use COM Interop with Word on your server, you must install ...
.NET csharp Read Write Hyperlinks Microsoft.Office.Interop.Word Being new to C#, I am not sure how to address the Microsoft.Office.Interop.Word. Hyperlinks collection correctly. Thanx in adavnce, Greg ...

Videos:
Fujitsu at Interop: DigInfo This movie briefly talks about Fujitsu's relationships with Cisco, NTT DoCoMo, and AU. Interop is a networking solutions exhibition that is held in m...
Fujitsu at Interop: Tokyo Technical Telecast: DigInfo This movie briefly talks about Fujitsu's relationships with Cisco, NTT DoCoMo, and AU. Interop is a networking solutions exhibition that is held in ...
World Tech Update In this weeks show: HP prepares to lay off workers, NYC hosts 3 tech conferences, 2 new digital cameras come out of Japan, VMworld is on in Las Vegas...
Extreme Networks' Interactive at Interop: DigInfo Interop means networking and Extreme Networks, an international networking solutions provider, had a number of interesting secure open source solutio...
Interop 2008 - Siemens (Openscape Video) TechWebTV Editor at Large, David Berlind, interviews Wayne Seifried, Director of World Portfolio Marketing for Siemens. Seifried talks about OpenScap...
Interop's 'dirty air' makes a perfect testing ground for Flu If the air around your WiFi network is really dirty — in other words, your WiFi net is having problems but you don't know why — then maybe you could ...
Vinton Cerf - Infinity and Beyond Dr. Vinton G. Cerf, Vice President and Chief Internet Evangelist Google presented 'Internet, Infinity and Beyond' in Brisbane on March 8th 2007. Ales...




Search This Site:










using panels insteat of pages with no chance to back button on browser

dom compare validation control not working...

back and button click, page_load is not launced

popup window

'system.diagnostics.log' is inaccessible due to its protection level

'page not found' within iframe

how does microsoft do this?

how to check if udp port on ip is open/avaible ? help.

could not load file or assembly 'system.core, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089' or one of its dependencies. the system cannot find the file specified

dropdownlist to create radio button (list) from sql query

throw exception how to get only custom error message

user control click events not firing

base stream not writable

script#

radio button control

very strange: stop ide or closebrowser does not stop sendind email....

ascdatadropdown question

dynamically loop through items in panel - including usercontrols

access control collection of inserttemplate

calendar control: first date displayed and last date displayed.

need a date picker written in javascript

running an aspx page having inline code

reportviewer does not show print option.

how to pass selectedvalues from one page to another page ????

implementing gps

smtp help. always put mails on queue folder and only send out after restart.

populating multiple drop down list with a single query

expression validator - deny values

drop down list events problem

upload file from codebehind to another page

  Privacy | Contact Us
All Times Are GMT