Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GETOBJECT not works?
Message
From
18/03/2001 15:47:27
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
18/03/2001 15:01:28
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00486277
Message ID:
00486330
Views:
12
All of this is in the Microsoft manuals, and the MSDN Library which is online at http://msdn.microsoft.com/library/default.asp.

You can learn a lot by recording a macro in Excel or Word and opening it in the VBA editor to see what's there. You'll get a lot of ideas for how to write the code in Visual FoxPro.

You might also like reading Tamar Granor and Della Martin's book. See http://www.hentzenwerke.com/catalogavailability/autofox.htm.


>Hi, Thanks for help.
>It works.
>I used
>MDOCFILE = CREATEOBJECT("Excel.Application")
>MDOCFILE.WorkBooks.Add('C:\Excel\MYDOC.XLS')
>MDOCFILE.Visible = .T.
>Then it will open Excel and the file MYDOX.XLS.
>Do you know where can I know it will be ".WorkBooks" in Excel and it will be ".Document" in Word?
>From Mircosoft's manual?
>
>
>>Power,
>>
>>Try:
>>MDOCFILE = CREATEOBJECT("Word.Application")
>>MDOCFILE.Documents.Add('C:\WRDPROC\MYDOC.DOC')
>>MDOCFILE.Visible = .T.
>>
>>>I have tried to put this inside a button
>>>MDOCFILE = GETOBJECT('C:\WRDPROC\MYDOC.DOC')
>>>or
>>>MBUDVAR = GETOBJECT('C:\Excel\aaa.XLS')
>>>and then run it.
>>>I got nothing happened on my screen. A short period of the loading symbol "sand watch" then nothing. What should I do to open an OLE automation object in its application like Excel or Word?
>>>
>>>Power
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform