Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving as Word doc
Message
 
To
04/04/2000 14:44:30
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00355154
Message ID:
00355221
Views:
16
Tom,
In your Word Help file go to the Contents tab and scroll down. Next to last (on mine, above End User License Agreement) is Microsoft Word Visual Basic Reference. It shows each command and the parameters. When transferring to VFP, you call the parameters in order as John did, substituting values for the variables shown in the Macro printout.

HTH
Barbara

>I need to save a document as a Word 97 format document in a specific place and need to auto-overwrite any old files.Here's what I've got so far...
>
>oword = CreateObject("Word.Application")
>WITH oword
> .Documents.Open(print_file)
> .ActiveDocument.PrintOut(0,0,range,"",from,to)
>
>this is what came out of the Word 97 macro editor. I can't make heads or tails of how to turn this into usable Foxpro code.
>
>.ActiveDocument.SaveAs FileName:="54947.doc", format:=wdFormatDocument, _LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False,
>_SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _False
>
>
> .ActiveWindow.Close
>
>Any suggestions?
>Tom Welch
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform