By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,775 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,775 IT Pros & Developers. It's quick & easy.

Custom OLE objects in VB.NET

P: n/a
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,

Apr 20 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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,

Apr 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.