Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to reference an OLE object created at design time
Message
From
03/01/2003 06:48:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/01/2003 02:20:23
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00737618
Message ID:
00737634
Views:
21
>I have a 'word.application' OLE object (OLEControl) on my form that was created at design time. My basic problem is how to use the object. How do I get to use the DOCUMENTS.ADD() method. I have no problem if i instantiated the object using CREATEOBJECT() but i don't want to create the object at run-time. The OLEControl's name is OLE1. Is it ok if i say something like THISFORM.OLE1.OBJECT.DOCUMENTS.ADD() or THISFORM.OLE1.OBJECT.SELECTION.TYPETEXT('Hello OLE')

Omar,
You could say :
THISFORM.OLE1.OBJECT.APPLICATION.DOCUMENTS.ADD

However since OleControl you added is not a word.application but a word.document object I don't know how you could utilize the new doc added.
Honestly I never use OleControl for word. Instead using a web browser control or doing with createobject() sounds much much better.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform