Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open a WinWord/Excel file from VFP
Message
 
To
13/03/2000 08:46:43
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00344931
Message ID:
00344941
Views:
24
>Hi, everyone
>
>Q-A.
>i want to open a Word/Excel from VFP program, how to do it.
>*** my program
>mfile = " "
>@ 2,2 get mfile
>read
>>>>>open the Word/Excel file<<<<
>*** end of program
>

public oWord && oExcel
oWord = CREATEOBJECT("word.application")
* oExcel= CREATEOBJECT("excel.application")

oWord.Visible = .t. && optional if you want it visible
myDocument = mfile
oWord.documents.open(myDocument)
* .oExcel.WorkBooks.Open(mfile)

I see you are using FoxPro 2.x style to get your filename. Why don't just use the textbox on your form and get the mfile from textbox.value?

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform