Insert StdPicture

A

Alex Ivanov

Hi All,

Does anybody know a better way to insert a picture from memory into a Word
document?
The best solution I have so far is to put the content of a StdPicture on the
Clipboard and then PasteSpecial it into a Range and resize as needed. This
works most of the time, though it's slow; however if a user does something
else while report is being generated, the chances are she would use the
Cliboard for something else, and then the problem guaranteed.

I tried using MSForms.Image instead, but it is much slower and the size of
the resulting document is much larger.

Pictures are generated at run-time and exist only in memory. I don't want to
save them into a file and then AddPicture() them from the file expecting
that it will be even slower than Paste.

All suggestions are welcome.

Thank you.
 
B

Bryan

According to Cindy M -WordMVP-" <[email protected]>

If you can get it on the Clipboard, you can paste it in.
But that's the extent.

(Except where Word 2003 is concerned. If a document is in
WordML (instead of
binary doc format) then the image can be put in the XML
stream as Base64.)
 

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