Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Office Automation
Message
De
08/10/2003 13:11:25
 
 
À
08/10/2003 10:05:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00836175
Message ID:
00836329
Vues:
9
>Cetin,
>
> That helped with my read only / file open thing, thanks a lot. I still have the problem with the template remaining open along with the merged document. How can I close the template document leaving up the merged one for editing, save, etc.?

In addition to the approach Cetin showed you, I prefer to use an object reference to the main document to close it. That is, when I create it I store an object reference to a variable. That way, I can use it to close that document:
oDoc = oWord.Documents.Add(<name of template>)
* Do what you need to, including the mail merge

* The merge result is always the active document
* right after the merge, so you can grab an object
* reference to it right away
oMergedDoc = oWord.ActiveDocument

* Now use the reference to the main doc to close it
oDoc.Close( wdDoNotSaveChanges)
Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform