Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RTF Printing using Report Writer
Message
 
À
01/03/2006 21:39:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01100710
Message ID:
01100733
Vues:
12
I have used low level functions to pull jpegs from General fields and write them out to files. Instead of using a strtofile to save the text as a jpg, Use the same code to export it out to a Word Document or whatever file type it is stored as. Try this, I borrowed it from someone up here and edited it for my use. This method should also preserve your formatting.
select mugs 

*Save the General Field to a table.
*NOTE* If you are saving more than one field, 
*the Gen field must be the first field in the table .
Copy fields mugshot_b to c:\tmpPics

lnHandle = Fopen('c:\tmpPics.dbf',12)
Fseek(lnHandle,43)
Fwrite(lnHandle,'M') && Changing General to Memo
Fclose(lnHandle)
Select 0
USE c:\tmpPics
Scan
    STRTOFILE(mugshot_b, 'c:\Picture'+Ltrim(Str(Recno()))+'.jpg')
EndScan
Then try some Office Automation to open the document.
LOCAL oWord as "word.application"
oWord = CREATEOBJECT("word.application")
oWord.Documents.Open(SomeTempFileName)
oword.Visible = .T.
James Harvey, MCP
Memphis Police Department
225 Channel Three DR
Memphis, TN 38103
901 577-1296
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform