Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation - Programatic selection of data source
Message
From
12/03/2008 16:49:24
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01297070
Message ID:
01301563
Views:
12
>>I have some coding for automation between FDP and word. I create a data source, merge the document, etc. Is there any way to code the program to tell word a specific location of a data source to use to merge into the word document template?
>
>
>oWord = CREATEOBJECT([Word.Application])
>oActiveDoc = oWord.Documents.Open([some document])
>WITH oActiveDoc.MailMerge
>     .MainDocumentType = 0 && Letter if my mind serves me well
>     .OpenDataSource([Some other document that should be used as a source for MailMegre],1,.f.)
>ENDWITH
>
The .opendatasource worked fine for me on my PC, although I found that certain machines would get an OLE error saying there was no data source for the document. They are running the same version of word with the same service pack and same OS. What can these certain machines be missing which would cause the command to not work from their machines?
``` Appreciate a normal day, it is always better than a bad one ```

Kev
Previous
Reply
Map
View

Click here to load this message in the networking platform