Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word MailMerge - Office 2000 vs Office XP w/ VFP 6
Message
De
23/01/2002 11:39:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Word MailMerge - Office 2000 vs Office XP w/ VFP 6
Divers
Thread ID:
00609065
Message ID:
00609065
Vues:
72
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)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform