Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to control Word converters in VFP?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How to control Word converters in VFP?
Divers
Thread ID:
00490597
Message ID:
00490597
Vues:
44
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform