import bitmap only possible from clipboard or file?

P

peteratoce

Hello,
I have created a COM dll with a method that returns a bitmap. Though the dll
can be referenced from VBA in Word, there seems to be no object / method in
Word to directly accept a bitmap. The only alternatives I found was to add my
bitmap to the InlineShapes either from file or from the clipboard.

Has anyone an idea on how to approach this issue , or even knows of a
solution?
 
J

Jonathan West

peteratoce said:
Hello,
I have created a COM dll with a method that returns a bitmap. Though the
dll
can be referenced from VBA in Word, there seems to be no object / method
in
Word to directly accept a bitmap. The only alternatives I found was to add
my
bitmap to the InlineShapes either from file or from the clipboard.

Has anyone an idea on how to approach this issue , or even knows of a
solution?

1. Save the bitmap to a file, and then insert the file using the
Shapes.AddPicture or InlineShapes.AddPicture method (depending on whether
you want the bitmap added floating or inline.

2. Place the bitmap on the clipboard and use the Paste or PasteSpecial or
PasteAndFormat method to insert the clipboard contents into the document.

There is no other method I know of.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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