Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Jan Kronsell
 
Posts: n/a
Default Mail Merge, Conditional INCLUDEPICTURE

Hi NG

Im doing a mailmerge, using the If ...THen...Else field to insert a text, if
a mergefield has a certain value (1) and another if the value is different
from 1. But instead of inserting a text, I like to include a picture if the
value in the field is "1", and another picture if it is not "1".

Is there any way to obtain this?

Jan


  #2   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill
 
Posts: n/a
Default Mail Merge, Conditional INCLUDEPICTURE

You can do this easily. Insert each of the pictures in a document (using
Link to File). Alt+F9 to view the IncludePicture field code and make sure it
is correct. Then copy/paste each of the field codes into the correct
respective location in your IF field. You could insert the pictures
(IncludePicture fields) directly into the IF field, but this can be somewhat
confusing and feel really strange.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jan Kronsell" wrote in message
...
Hi NG

Im doing a mailmerge, using the If ...THen...Else field to insert a text,

if
a mergefield has a certain value (1) and another if the value is different
from 1. But instead of inserting a text, I like to include a picture if

the
value in the field is "1", and another picture if it is not "1".

Is there any way to obtain this?

Jan



  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor
 
Posts: n/a
Default Mail Merge, Conditional INCLUDEPICTURE

Suzanne S. Barnhill wrote:
You could
insert the pictures (IncludePicture fields) directly into the IF
field, but this can be somewhat confusing and feel really strange.


But if you want to try that, using CTRL+F9 for each pair of field boundaries
{} enter the following directly in your document:

{IF {Mergefield fieldname} = 1 "{IncludePicture
"c:\\path\\picturefilename1.jpg"}" "{IncludePicture
"c:\\path\\picturefilename2.bmp"}"}

Note the double slashes and quotes and substitute the correct data as
required

Merge to a new document then select that document CTRL+A and update F9 to
display the correct pictures

You could also insert pictures based on the content of your data file - see
http://www.gmayor.com/mail_merge_graphics.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



  #4   Report Post  
Posted to microsoft.public.word.newusers
macropod
 
Posts: n/a
Default Mail Merge, Conditional INCLUDEPICTURE

Hi Graham et al,

If all the pictures have the same name, except for the number, which is
returned by your MERGEFIELD, another way would be:

{INCLUDEPICTURE "c:/path/picturefilename{MERGEFIELD fieldname}.jpg"}

Note, too, that you can use a single forward slash for the path separator
instead of double backslashes.

Cheers



"Graham Mayor" wrote in message
...
Suzanne S. Barnhill wrote:
You could
insert the pictures (IncludePicture fields) directly into the IF
field, but this can be somewhat confusing and feel really strange.


But if you want to try that, using CTRL+F9 for each pair of field

boundaries
{} enter the following directly in your document:

{IF {Mergefield fieldname} = 1 "{IncludePicture
"c:\\path\\picturefilename1.jpg"}" "{IncludePicture
"c:\\path\\picturefilename2.bmp"}"}

Note the double slashes and quotes and substitute the correct data as
required

Merge to a new document then select that document CTRL+A and update F9 to
display the correct pictures

You could also insert pictures based on the content of your data file -

see
http://www.gmayor.com/mail_merge_graphics.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org





  #5   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill
 
Posts: n/a
Default Mail Merge, Conditional INCLUDEPICTURE

Note that one of John's files was a JPEG and one a BMP. If the TrueText and
FalseText also involve mergefields, then it becomes a bit more complex.
Worse still, I found that when I wanted to use a photo if one was available
and otherwise print "NO PHOTO AVAILABLE," the only way I could get it to
work (despite lots of experimentation with swapping TrueText and FalseText,
etc.) was to create an image that said "NO PHOTO AVAILABLE" and use that
filename for the FalseText.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"macropod" wrote in message
...
Hi Graham et al,

If all the pictures have the same name, except for the number, which is
returned by your MERGEFIELD, another way would be:

{INCLUDEPICTURE "c:/path/picturefilename{MERGEFIELD fieldname}.jpg"}

Note, too, that you can use a single forward slash for the path separator
instead of double backslashes.

Cheers



"Graham Mayor" wrote in message
...
Suzanne S. Barnhill wrote:
You could
insert the pictures (IncludePicture fields) directly into the IF
field, but this can be somewhat confusing and feel really strange.


But if you want to try that, using CTRL+F9 for each pair of field

boundaries
{} enter the following directly in your document:

{IF {Mergefield fieldname} = 1 "{IncludePicture
"c:\\path\\picturefilename1.jpg"}" "{IncludePicture
"c:\\path\\picturefilename2.bmp"}"}

Note the double slashes and quotes and substitute the correct data as
required

Merge to a new document then select that document CTRL+A and update F9

to
display the correct pictures

You could also insert pictures based on the content of your data file -

see
http://www.gmayor.com/mail_merge_graphics.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org








  #6   Report Post  
Posted to microsoft.public.word.newusers
Jan Kronsell
 
Posts: n/a
Default Mail Merge, Conditional INCLUDEPICTURE

Hi Suzanne

I tried you method, and it works, but only amlost. When I paste the
INCLUDEPICTURE fiels into the IF THEN ELSe field and show the picture in
stead of the code (by Pressing Shift+F9 on the now nested INCLUDEPICTURE
field), it displays the pciture as long as the field code for the If Then
Else fiels is still shown, but as soon as I press Shift+F9 on the outer
field (IF THE ELSE) the picture disappears, leaving only a square the size
of the picture with a small "pic not found" or whatever it is, icon in the
upper left corner.

Regards
Jan

"Suzanne S. Barnhill" skrev i en meddelelse
...
You can do this easily. Insert each of the pictures in a document (using
Link to File). Alt+F9 to view the IncludePicture field code and make sure
it
is correct. Then copy/paste each of the field codes into the correct
respective location in your IF field. You could insert the pictures
(IncludePicture fields) directly into the IF field, but this can be
somewhat
confusing and feel really strange.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"Jan Kronsell" wrote in message
...
Hi NG

Im doing a mailmerge, using the If ...THen...Else field to insert a text,

if
a mergefield has a certain value (1) and another if the value is
different
from 1. But instead of inserting a text, I like to include a picture if

the
value in the field is "1", and another picture if it is not "1".

Is there any way to obtain this?

Jan





  #7   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill
 
Posts: n/a
Default Mail Merge, Conditional INCLUDEPICTURE

This will certainly be the case in your mail merge main document because the
IF field is not getting any information about whether or not the condition
is met. When you create the merge, then it will have data from the specific
field in each record referenced by the mergefield.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jan Kronsell" wrote in message
...
Hi Suzanne

I tried you method, and it works, but only amlost. When I paste the
INCLUDEPICTURE fiels into the IF THEN ELSe field and show the picture in
stead of the code (by Pressing Shift+F9 on the now nested INCLUDEPICTURE
field), it displays the pciture as long as the field code for the If Then
Else fiels is still shown, but as soon as I press Shift+F9 on the outer
field (IF THE ELSE) the picture disappears, leaving only a square the size
of the picture with a small "pic not found" or whatever it is, icon in the
upper left corner.

Regards
Jan

"Suzanne S. Barnhill" skrev i en meddelelse
...
You can do this easily. Insert each of the pictures in a document (using
Link to File). Alt+F9 to view the IncludePicture field code and make

sure
it
is correct. Then copy/paste each of the field codes into the correct
respective location in your IF field. You could insert the pictures
(IncludePicture fields) directly into the IF field, but this can be
somewhat
confusing and feel really strange.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Jan Kronsell" wrote in message
...
Hi NG

Im doing a mailmerge, using the If ...THen...Else field to insert a

text,
if
a mergefield has a certain value (1) and another if the value is
different
from 1. But instead of inserting a text, I like to include a picture if

the
value in the field is "1", and another picture if it is not "1".

Is there any way to obtain this?

Jan






  #8   Report Post  
Posted to microsoft.public.word.newusers
Jan Kronsell
 
Posts: n/a
Default Mail Merge, Conditional INCLUDEPICTURE

Off cause

Thank you.

Jan
"Suzanne S. Barnhill" skrev i en meddelelse
...
This will certainly be the case in your mail merge main document because
the
IF field is not getting any information about whether or not the condition
is met. When you create the merge, then it will have data from the
specific
field in each record referenced by the mergefield.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"Jan Kronsell" wrote in message
...
Hi Suzanne

I tried you method, and it works, but only amlost. When I paste the
INCLUDEPICTURE fiels into the IF THEN ELSe field and show the picture in
stead of the code (by Pressing Shift+F9 on the now nested INCLUDEPICTURE
field), it displays the pciture as long as the field code for the If Then
Else fiels is still shown, but as soon as I press Shift+F9 on the outer
field (IF THE ELSE) the picture disappears, leaving only a square the
size
of the picture with a small "pic not found" or whatever it is, icon in
the
upper left corner.

Regards
Jan

"Suzanne S. Barnhill" skrev i en meddelelse
...
You can do this easily. Insert each of the pictures in a document
(using
Link to File). Alt+F9 to view the IncludePicture field code and make

sure
it
is correct. Then copy/paste each of the field codes into the correct
respective location in your IF field. You could insert the pictures
(IncludePicture fields) directly into the IF field, but this can be
somewhat
confusing and feel really strange.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Jan Kronsell" wrote in message
...
Hi NG

Im doing a mailmerge, using the If ...THen...Else field to insert a

text,
if
a mergefield has a certain value (1) and another if the value is
different
from 1. But instead of inserting a text, I like to include a picture
if
the
value in the field is "1", and another picture if it is not "1".

Is there any way to obtain this?

Jan








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
Mail Merge from Excel - conditional field choice? Gordon Smith \(eMVP\) Mailmerge 1 December 13th 05 05:18 AM
Word 2003 mail merge conditional numeric formatting [email protected] Mailmerge 1 September 21st 05 08:58 PM
Conditional Mail Merge Help Susan Ramlet Mailmerge 0 August 22nd 05 06:26 PM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Conditional mail merge Hanif Mailmerge 1 November 26th 04 07:10 PM


All times are GMT +1. The time now is 05:33 AM.

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"