Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word MailMerge Questionm
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00475488
Message ID:
00475502
Vues:
38
the object is oWordDocument. Can I reference oWord?

oWordDocument=createobject("word.basic") && Create word object

WITH oWordDocument

if !empty(tcTemplate)
.filenew(tcTemplate) && open using template table
else
.filenewdefault && no template - new file
endif

.MailMergeOpenDataSource(cDatasource,,, 1 ,,,,,,,;
cDSN+cSourceDb+cSourceType+cOther, cSQLStatement) && Open data source - Link to source
.MailMergeEditMainDocument && Activate the main document

.activedocument.saveas("c:\rt50v53\testmmsave.doc")

ENDWITH


>Use the Word object reference, not the WordDocument reference
with oWord

.ChangeFileOpenDirectory(lcSavePath)
.ActiveDocument.SaveAs(lcSaveName)
endwith
oWordDocument.SaveAs("c:\rt50v53\testmmsave.doc") should also work.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform