Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Name a Word doc without saving?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01395715
Message ID:
01395736
Vues:
75
>I use word to create temporary documents based upon templates. They have data merged, are printed, and are then closed without saving. I'd like to be able to refer to them during the automation process as something other than Document n. Is there a way to do this?

You may use ActiveDocument or ActiveWindow, and then no name is needed, like:
oWord = CREATEOBJECT("Word.Application")
oWord.documents.add()
with oWord.ActiveDocument
    * do whatever you wish
endwith
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform