Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Hello,
As you know if you open a Word document which has Mail Merge fields, Word will ask you "...Opening this document will run the following SQL command: SELECT * FROM ..". I am writing code which needs to analyze a Word document and to identify the data source used for this document, but couldn't find a resolution. Can someone give me a clue how we can fetch the name of Data Source? Thanks Below is my pseudo code (C#) looks like? // Create a Word App obj myWordApp = new Word.ApplicationClass(); // Load the word document file String wordFile = "c:\\temp\\test.doc"; bject missing = System.Reflection.Missing.Value; Word.Document myWordDoc = myWordApp.Documents.Add(ref wordFile, ref missing, ref missing, ref missing); // See if we can find out the data source. However dataSource is empty String dataSource = myWordDoc.MailMerge.DataSource.ConnectString; |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding a document attached to a data source | Microsoft Word Help | |||
Word 2003 Mail Merge Problem when E-Mailing Data Source | Mailmerge | |||
Mail Merge can't find data source in Office XP...but it could in 2000! | Mailmerge | |||
Word cannot find data source | Mailmerge | |||
Data Form button | Mailmerge |