Inserting and sizing a photo with code.

B

BRC

win2k, word 2k
I am working on a template for a report. In the report we include a
different photo in each report. I would like to be able to run a
routine that would display the "insertpicture" dialog, and size the
user's selection and insert it at a specific place in the document. I
am assuming i could use a bookmark to specify where to insert. I am
wondering if I should use some kind of place holder in the template to
make certain that inserting the pic doesn't disturb the formating in
other sections of the report.
I have found several discussions about inserting pics but not how to
set the size at time of insertion. thanks for any direction on this.
BRC
 
D

Dave Lett

Hi BRC,

You could select the bookmark range first and then run something like the
following:

'''shows the pix dialog box
If Dialogs(wdDialogInsertPicture).Show <> 0 Then
'''resizes the shape
Selection.Paragraphs(1).Range.InlineShapes(1).Select
With Dialogs(wdDialogFormatPicture)
.ScaleX = 34
.ScaleY = 34
.Execute
End With
End If

HTH,
Dave
 

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