Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word & Excel Automation
Message
 
À
17/03/2006 10:17:50
Freddie Rodrigues
Bitrun Business Solutions
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01105299
Message ID:
01105313
Vues:
17
>Can anyone guide me on how to Open, Close & Save < WORD & EXCEL > files in a way that the user should Save & Open Documents only through FOXPRO Code.
>
>Thanks,
>Freddie Rodrigues
oExcel = CREATEOBJECT([Excel.Application])

*** Open a WorkBook
oExcel.WorkBooks.Open([full path to Excel file here.xls])

*** Save a WorkBook
oExcel.ActiveWorkBook.Save()

*** Close
oExcel.ActiveWorkBook.Close()

*** Quit Excel
oExcel.Quit()


oWord = CREATEOBJECT([Word.Application])

*** Open a document
oWord.Documents.Open([full path to word file here.doc])

*** Save a Document
oWord.ActiveDocument.Save()

*** Close
oWord.ActiveDocument.Close()

*** Quit Word
oWord.Quit()
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform