Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting a picture during Word mailmerge

Status
Not open for further replies.

JudyL

Instructor
Feb 21, 2001
148
US
In Word 2003, during a mailmerge, I want to use the mailmerge If statement to include specific pictures depending on the value in the field. I have gotten that part to work. My problem is how to size the graphic. I can position it by using Advance codes just before the If statement. I just need to figure out how to size the graphic.

Do I need to get all the grapics the correct size in the grapic file before the merge. Another thought is to write VBA code using the MailmergeAfterRecordMerge Event.

 
Hi JudyL,

If you format the picture layouts as 'square' and position their anchors between the double quotes in the appropriate parts of the IF statement, formatting the picture's position relative to the page/margin or paragraph should take case of the positioning issue, especially if you enable/disable the 'move with text' option, if appropriate. For example:
{IF{MERGEFIELD MyPic}= TRUE "Pic1Anchor" "Pic2Anchor"}

Unless the pictures are being inserted via mailmerge fields embedded in INCLUDEPICTURE fields, it's best to format the picture sizes beforehand. If the pictures are being inserted via mailmerge fields embedded in INCLUDEPICTURE fields, you might need to insert the INCLUDEPICTURE fields into textboxes of the appropriate sizes and manage the size/position of the textboxes as per the paragraph above.


Cheers
[MS MVP - Word]
 
Thanks for your reply. I am using the INCLUDEPICTURE field because the picture file to be include varies depending on the value of a field. Because of that the first method won't work. I tried putting the code in a text box but it only sizes the text box. The picture gets cropped. It looks like we will have to set the picture size in the picture file itself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top