Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy to a winword
Message
De
04/03/2010 13:07:26
 
 
À
04/03/2010 04:45:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01452422
Message ID:
01452538
Vues:
67
>Hi all,
>
>How can i copy three winword file into a new winword file with VFP command.
>
>That three winword within text/photo/draw box, i want to copy all into a new file.
>

This is untested.
* Assuming you have the filenames (including path) of the three 
* Word docs in cDoc1, cDoc2 and cDoc3
LOCAL oWord, oDoc, oRange
oWord = CREATEOBJECT("Word.Application")
oDoc = oWord.Documents.Open(m.cDoc1)
oRange = oDoc.Range()
oRange.Collapse(0)
oRange.InsertFile(m.cDoc2)
oRange.Collapse(0)
oRange.InsertFile(m.cDoc3)

* Assumes you have the new document's location stored in cResultFile
oDoc.SaveAs(m.cResultFile)
Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform