Custom OLE objects in VB.NET

G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top