>>>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement