Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
Mail Merge from Excel - conditional field choice? | Mailmerge | |||
Word 2003 mail merge conditional numeric formatting | Mailmerge | |||
Conditional Mail Merge Help | Mailmerge | |||
mail merge with attachments | Mailmerge | |||
Conditional mail merge | Mailmerge |