Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Includepicture field in a mailmerge
I have an excel list that has a dexcription field, a price field and a photo
field. The photo field has the name of an image file in it. I am using the Word Mailmerge Catalog command. I need to know the syntax of the Includepicture with the mergefield command. Many thanks |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Includepicture field in a mailmerge
If the field just has the name of the file, you will probably need to
supply the pathname. Use double backslashes or single forward slashes as the path separator, e.g. something like { INCLUDEPICTURE "c:\\mypics\\{ MERGEFIELD photofilename }" } substitute /your/ folder pathname and merge field name. All the {} have to be the special "field code braces" that you can insert using ctrl-F9. You will probably also find that you need to select the output document, select it, and press F9 to update all the images. If your field has the complete pathname, you /probably/ won't be able to use { INCLUDEPICTURE "{ MERGEFIELD photopathname }" } as you might hope, unless the pathname has double backslashes or single forward slashes as path separators. You may also find inserting a \d switch helpful, e.g. { INCLUDEPICTURE "c:\\mypics\\{ MERGEFIELD photofilename }" \d } Peter Jamieson http://tips.pjmsn.me.uk sot wrote: I have an excel list that has a dexcription field, a price field and a photo field. The photo field has the name of an image file in it. I am using the Word Mailmerge Catalog command. I need to know the syntax of the Includepicture with the mergefield command. Many thanks |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Includepicture field in a mailmerge
Hi Peter,
If the path has only the single slashes, you should be able to use: {INCLUDEPICTURE "{QUOTE{MERGEFIELD photofilename}}"} -- Cheers macropod [MVP - Microsoft Word] "Peter Jamieson" wrote in message ... If the field just has the name of the file, you will probably need to supply the pathname. Use double backslashes or single forward slashes as the path separator, e.g. something like { INCLUDEPICTURE "c:\\mypics\\{ MERGEFIELD photofilename }" } substitute /your/ folder pathname and merge field name. All the {} have to be the special "field code braces" that you can insert using ctrl-F9. You will probably also find that you need to select the output document, select it, and press F9 to update all the images. If your field has the complete pathname, you /probably/ won't be able to use { INCLUDEPICTURE "{ MERGEFIELD photopathname }" } as you might hope, unless the pathname has double backslashes or single forward slashes as path separators. You may also find inserting a \d switch helpful, e.g. { INCLUDEPICTURE "c:\\mypics\\{ MERGEFIELD photofilename }" \d } Peter Jamieson http://tips.pjmsn.me.uk sot wrote: I have an excel list that has a dexcription field, a price field and a photo field. The photo field has the name of an image file in it. I am using the Word Mailmerge Catalog command. I need to know the syntax of the Includepicture with the mergefield command. Many thanks |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Includepicture field in a mailmerge
Thanks!
FWIW I decided to recheck a number of variations on how you might insert a path+filename, e.g. a. the entire pathname is in a merge field { INCLUDEPICTURE "{ MERGEFIELD fullpathname }" } b. the enclosing folder path with teminating separator, and the filenam are in two merge fields { INCLUDEPICTURE "{ MERGEFIELD pathwithsep }{ MERGEFIELD filename }" } c. the enclosing folder path without a terminating separator, and the file name are in two merge fields, with a literal separator { INCLUDEPICTURE "{ MERGEFIELD pathwithoutsep }\\{ MERGEFIELD filename }" } d. the path is a literal string, but the filename is in a field { INCLUDEPICTURE "c:\\mypath\\{ MERGEFIELD filename }" } and tried fullpathname, pathwithsep, pathwithoutsep, with single backslash, double backslash, single forward slash, with the equivalent separators inserted manually in cases (c) and (d). Interestingly enough, with all three types of separator, type (a) worked OK in Word 2k+Win2k, Word XP+WinXP, Word 2003+Win XP and Word 2007+Vista. (and Word 95+Win2k, for that matter) On all those four versions of Word, all the other combinations worked as well, except (c) with single backslashes and (d) with single backslashes Even (c) with single backslashes worked if you used a double backslash literal after { MERGEFIELD pathwithoutsep } instead of a single backslash literal. Just out of interest, when I tried wrapping the fields+literals making up the full pathname in a QUOTE field, Word didn't like it at all, typically either crashing Word (Word 2000), or hanging Word in case (d) (I got fed up at that point and didn't check any of the other cases :-) ) Something that happened in Word 2007 - probably after I had already corrupted th document in some way though, suggested that Word code could well be trying to interpret a single backslash + opening field code as an ordinary character, or some kind of escape character, thus screwing up field code brace matching and generally getting lost. Best regards, Peter Jamieson http://tips.pjmsn.me.uk macropod wrote: Hi Peter, If the path has only the single slashes, you should be able to use: {INCLUDEPICTURE "{QUOTE{MERGEFIELD photofilename}}"} |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Includepicture in mailmerge that varies for each record | Mailmerge | |||
IncludePicture in Automated MailMerge | Mailmerge | |||
Can't See Field Code for INCLUDEPICTURE | Mailmerge | |||
includepicture with problems in mailmerge | Mailmerge | |||
More header help, please? IncludePicture with mailmerge | Mailmerge |