Inserting a PictureBox picture into a Word document

R

Rick

How do I go about doing this? Basically I have a field where the user
inputs a doctors name, a field where the user inputs the doctors bio, and
then a picturebox where they select an image from their hard disk. I need
all this info to be saved into a Word template, but I'm not sure how to do
it.

I program in C++, but I have had some experience with VB.

BTW, I am using .NET
 
D

Doug Robbins - Word MVP

Hi Rick,

I am not quite sure what you mean by a picture box, but if it's a cell of a
table, then in VBA, you would use

myDoc.Tables(1).Cell(1, 1).Range.InlineShapes.AddPicture FileName:=
["filename"]

where myDoc is defined as an Object and is Set to a document.

I have no idea what difference C++ or .Net will make

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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