Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
sot sot is offline
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Includepicture in mailmerge that varies for each record Saabdiver Mailmerge 2 August 13th 08 09:18 AM
IncludePicture in Automated MailMerge Tom Bean Mailmerge 2 June 11th 08 03:22 PM
Can't See Field Code for INCLUDEPICTURE Alberto Martinez Mailmerge 4 May 4th 08 08:03 PM
includepicture with problems in mailmerge Anderflash Mailmerge 3 September 30th 07 11:57 AM
More header help, please? IncludePicture with mailmerge Earl B Mailmerge 1 April 18th 06 06:38 PM


All times are GMT +1. The time now is 04:53 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"