Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is my OLE container not visible?
Message
 
To
14/05/2005 14:11:46
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00978732
Message ID:
01014325
Views:
22
You have to either have to cast object to a proper library (like Visual Studio Tools for Office or Word.Application imported from the Office Type libs) or you have to use Reflection like I showed in the last example...

The other alternative is to create a separate assembly in VB and turn option strict off and use non-strong typing against the Com object. If you have a complex set of actions you need to deal with this is often a good way to go. But make sure to isolate that code into a separate assembly to avoid forcing all code to use Option Strict Off.

+++ Rick ---

>Rick:
>
>I'm real new to the embedded object stuff.
>
>In the code example you gave, what would you do if you wanted to
>a) show a previously created Word Document (eg let's call it dictation.doc)
>b) show it on a form, within something like an editbox with scroll bars on the side
>c) maintain all the formatting originally entered in Word
>d) make it read only (ie the user can't edit it)
>
>C
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform