Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print a general field ?
Message
De
14/06/2007 11:28:31
 
 
À
14/06/2007 11:24:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01232294
Message ID:
01233060
Vues:
16
You can use MS-Word bookmarks to insert external values (from VFP) programmatically.

>Is it possible to add (merge) some lines of text at the bottom of the document to printout? If so, how can I do that?
>
>
>*Procedure YGeneral_PrintWord
>* assuming there is a table having General field lcfile and there is a WORD document, embedded
>
>use (your_table)
>Genfiedname="General_Field_Name"
>
>GO (appropriate_record_number)
>
>local oForm
>oForm = Createobject('_Form',Genfiedname)
>WITH oForm.myOle1
> IF .oleclass="Word.Document"
> * set the control size properly;
> * otherwise the document paper size may be not properly inherited.
> .width=600
> .height=800
> .object.Activate
> .object.PrintOut(0)
> ELSE
> ?"? OLeclass: ", .oleclass
> endif
>ENDWITH
>=oForm.Release()
>RETURN
>*-------------------------------------------------------------------
>Define Class _Form As Form
> PROCEDURE iNIT
> LPARAMETERS pGenFieldName
> this.addobject('myOLe1',"OleBoundControl")
> this.myole1.ControlSource = ALIAS()+'.'+pGenfieldName
> ENDPROC
>Enddefine
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform