Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy to a winword
Message
From
04/03/2010 13:07:26
 
 
To
04/03/2010 04:45:52
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01452422
Message ID:
01452538
Views:
66
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform