Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Excel into Word?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01469244
Message ID:
01469273
Vues:
40
>Hello and thanks for your help!
>
>There must be a way to insert an excel sheet into a word document. If you can help me with this I'll really appreciate it. I basically need to insert the excel file into word and then print it to PDF.
>
>Thanks a lot!!!!!!!!!!!!!!
>
>Juan

Something like this:
oword=createobject("Word.Application")
WITH oWord
	.documents.add()
	.visible=.t.
* Insert Excel Object	
    .Selection.InlineShapes.AddOLEObject("Excel.Sheet.8",fullpath(ExcelFIle), .f.,.f.)
* Print it , details may vary depending on your pdf printer
          lcActivePrinter=.ActivePrinter			
         .ActivePrinter = "Win2PDF"
          lcoutfile="c:\outfile.pdf"
         erase ( lcoutfile)
        .PrintOut(.f.,.f.,"", lcoutfile,,,,,,,.t.)
     
    .ActivePrinter = lcActivePrinter		&&set default printer back
endwith
 .....
Good Luck
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform