Add Picture to Word Document?

N

nfalconer

Hello,

I am interacting with a Word Document that should be able to have an image
that I specify inserted into the document. I am interacting with the Word
document through the Microsoft Word COM object. I have a good understanding
of how to create the document and insert text and tables, however, the
insertion of images is something that I cannot find a sample or reference
for.

Assuming this is the correct forum for this question, how would I
programatically insert an image into a Word document using the COM
interface?

Thanks.
 
C

Cindy M -WordMVP-

Hi Nfalconer,

You need the AddPicture method of either the Shapes or InlineShapes
collection. Generally, I prefer to insert InlineShapes, personally.

(The difference is that Word handles InlineShapes like text characters; Shapes
are formatted with "text flow" and are managed in a different document "layer"
along with Drawing objects.)
I am interacting with a Word Document that should be able to have an image
that I specify inserted into the document. I am interacting with the Word
document through the Microsoft Word COM object. I have a good understanding
of how to create the document and insert text and tables, however, the
insertion of images is something that I cannot find a sample or reference
for.

Assuming this is the correct forum for this question, how would I
programatically insert an image into a Word document using the COM
interface?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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