468,735 Members | 2,207 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,735 developers. It's quick & easy.

Custom OLE objects in VB.NET

Hello All,

I have created a custom "field" object in .Net that implements IOleObject.
It inherits from "System.Windows.Forms.Label". It also has several public
properties that contain data to be recalled later. I have also provided COM
identity by exposing ClassID, InterfaceID, and EventsID. I can drop these
objects into a RichTextBox using the IRichEditOle interface. They display
correctly, save to RTF, and Reload into the Richtextbox correctly. I can also
iterate through the objects in the richtextbox and cast the appropriate
objects back to my custom field object and retrieve the data for each
embedded object. Works great.

It even displays correctly in WordPad!!! Nice :)

HOWEVER, when I attempt to load the same file up in Microsoft Word, I get
the icon place holders for the objects. They do not draw correctly. When I
click on a placeholder I get an error stating that "There is not enough
memory or disk space to display or print the picture". I can right-click the
place holder and attempt a convert. It knows the namespace and object name.
When I convert, I get a different placeholder that says "Error! Not a valid
embedded object"

I'm suspecting that I'm not implementing the interface correctly, or I'm
missing other interfaces that need to be implemented.

Please help as I would really like this to show up in the document when it's
opened in Word.

I am using Visual Studio 2005, VB.NET

I can handle examples in VB.NET or C#

Thanks in advance,
Tony

Apr 20 '07 #1
1 4399
By the way, I do not necessarily need in place activation of the objects from
within Microsoft Word. If they just showed up correctly without errors, that
would be great.

Thanks again,
Tony

Apr 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Scott Zabolotzky | last post: by
19 posts views Thread by Jamey Shuemaker | last post: by
8 posts views Thread by Techno_Dex | last post: by
9 posts views Thread by Greger | last post: by
3 posts views Thread by =?Utf-8?B?R2hpc3Rvcw==?= | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.