Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Write Word file from VFP
Message
De
07/10/1996 16:23:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00009512
Message ID:
00009555
Vues:
48
>>>>I have a table named "examques" with some fileds, one of them is a general
>>>>type field. And I have an VFP application working with "examques", the
>>>>functions of the application include ADD/EDIT/DELETE/PRINT...; I design a
>>>>form to process ADD/EDIT, one OLE Bound Control for the general type field,
>>>>the OLE bound control application is WORD.
>>>>
>>>>Could anyone tell me how to generate a WORD document file from VFP?
>>>>
>>>>Thanks !!
>>>>
>>>>Catherina of AS SOTA Co.
>>>
>>>
>>>The VFP 5.0 CD contains a file called RichTx32.Ocx. This file may help you. I would look at exporting using RTF format (via RichTx32.Ocx).
>>>
>>>HTH
>>>Tom
>>
>>Can I use RichTx32.Ocx in VFP 3.0b ?
>
>Catherina
>
>I just tried it here & yes it works.
>
>HTH,
>Tom

Try it like this.

LOCAL lcTemplate, lcTempdir, lcFiledir, lcFilename

lcTemplate= ALLTRIM(This.Parent.combo1.value)
lcTempdir = ALLTRIM(system.templates)
lcFiledir = ALLTRIM(system.documents)
lcFilename= ALLTRIM(This.Parent.r_textbox2.Value)

gcWordObj =CREATEOBJECT('Word.Basic')

gcWordObj.FileNew(lcTempdir + lcTemplate)

gcWordObj.FIleSaveAs(lcFiledir + lcFilename)
gcWordObj.Appmaximize
gcWordObj.Appshow
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform