Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming word documents
Message
From
15/09/1997 13:51:59
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00050126
Message ID:
00050127
Views:
20
>i'm dynamically creating some word documents using word basic.
>i can add all my text with formatting etc. but i just can seem to find a way to name my file.
>anyone know how to do it?
>thanks

Gray,
here is sample code that I use in Word 95...

* Build filename to create in Word from template file

lcFilename = oWWH.wordata_path+header.exch+"\"+TRIM(header.wonbr)

oWord = CREATEOBJECT("Word.Basic")

WITH oWord

.AppShow && Makes Word Visible

.AppMaximize(1)

.FileOpen(lcMergefile)

.StartOfDocument()

.FileSaveAs(lcFilename)

... More code follows

ENDWITH

Hope this helps..

PS: You should look into the new version of Word, supposedly it is easier than using Wordbasic, since it is using VBA...

Thanx!

Tony Miller
PTI, Vancouver, Wa
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform