Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to control Word converters in VFP?
Message
From
31/03/2001 12:00:50
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00490597
Message ID:
00490607
Views:
7
Why do you pass Format parameter as a string and also pass it as second parameter? You have to make the following changes in your code:
...
myformat = oWordApp.FileConverters("WordStar 3.3 - 7.0").OpenFormat
...
    .Documents.Open(Workingfile,,,,,,,,,myformat)
...
Hope this helps.

Alex

>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
Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform