Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
hello there;
I've creating a mailmerge template in Word 2003. The datasource (in excel) includes filenames for .jpg images - 1 image per record, set against text fields (it's actually property details, with a picture of the property). The text fields are OK, but I recorded a macro, which I attached to the template document, to type in the 'includePicture' command. The way I want it to work is that the users open the template, open the datasource, then run the macro to insert the 'Include picture' command in the final column of a Word table. This worked fine the first time I did it, but when I have tested it again, the process is adding an additional copy of the image against each record in the merged document - this is incrementing by 1 each time I run the process. The code in the macro is: Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ PreserveFormatting:=False Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.TypeText Text:="IncludePicture""\\\\Printserver\\cblftp\\" Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ PreserveFormatting:=False Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.TypeText Text:="MERGEFIELD PHOTO" Selection.Delete Unit:=wdCharacter, Count:=1 Selection.Delete Unit:=wdCharacter, Count:=1 Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.TypeText Text:="""" Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.TypeText Text:="\d" Selection.Delete Unit:=wdCharacter, Count:=1 End Sub Can anybody help? Thanks |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need Macro to Insert Pictures into table - one per row. | Tables | |||
Macro Help - sizing pictures | Microsoft Word Help | |||
how to insert watermarked pictures into business card template | Microsoft Word Help | |||
Mailmerge with Logo's (pictures) | Mailmerge | |||
How to set a macro to insert a second page into a template | Microsoft Word Help |