Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to control Word converters in VFP?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to control Word converters in VFP?
Miscellaneous
Thread ID:
00490597
Message ID:
00490597
Views:
43
I'm trying to convert Word Star documents into Word.

I'm using the following code which works fine until I try and open the document using the converter line in the open command.

Word's macro document says the open command line should contain.

.document.open 'file_name',FileConverters("WordStar 3.3 - 7.0").OpenFormat

However, I can't get it to work in VFP.

can anyone help?

Thanking you in advance.
-Curtis

My try

Workingfile='myfile.wsd'
myformat='FileConverters("WordStar 3.3 - 7.0").OpenFormat'

WITH oWordApp
.ChangeFileOpenDirectory (newpath)
.Documents.OPEN (Workingfile,myformat)
WITH .ActiveDocument.PageSetup
.TopMargin = (18)
.BottomMargin = (17)
.LeftMargin = (18)
.RightMargin = (34)
.Gutter = (0)
.HeaderDistance = (36)
.FooterDistance = (36)
ENDWITH
.SELECTION.WholeStory
.SELECTION.FONT.SIZE = 9
.SELECTION.FONT.NAME = ("Courier New")
.SELECTION.ParagraphFormat.RightIndent = (0.1)
.ActiveDocument.SAVEAS(rtffilename,wdFormatRTF)
.ActiveDocument.SAVEAS(txtfilename,wdFormatTextLineBreaks)
.ActiveDocument.CLOSE
Next
Reply
Map
View

Click here to load this message in the networking platform