General information
Category:
COM/DCOM and OLE Automation
Title:
Word MailMerge - Office 2000 vs Office XP w/ VFP 6
I am doing MailMerge into a Word document (Office 2000) and everything works. I do the same thing into Word XP and an error occurs attaching the DataSource. I have used objbect browser and Macro recorder and everything LOOK the same.
There are 2 additional Parameters in Office XP [OpenExclusive], [SubType]
However; when recording the MACRO in Word XP I do not see the parameter set.
Could this be a service pack Issue, I do not know if one is insatlled or not.
Any suggestions?
****************
**Sample Code *
****************
wdOpenFormatAuto = 0
lcTableName = "C:\Test.dbf"
cDSN = "DSN=FoxPro Files - Word;UID=;PWD=;"
cSourceDB = "SourceDB=C:\;"
cSourceType = "DBF;"
cOther = "Exclusive=No;BackgroundFetch=No;Collate=MACHINE;Null=Yes;Deleted=Yes;"
cSelect = "SELECT * FROM "+lcTableName
oWord = CreateObject("Word.Application")
oWord.ActiveDocument.MailMerge.MainDocumentType = 0 && wdFormLetters
oWord.ActiveDocument.MailMerge.OpenDataSource(lcTableName,wdOpenFormatAuto,,,;
,,,,;
,,,;
cDSN+cSourceDB+cSourceType+cOther,;
cSelect)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only