General information
Category:
Coding, syntax & commands
Title:
How to control Word converters in VFP?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only