Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Matthew Loraditch Matthew Loraditch is offline
external usenet poster
 
Posts: 2
Default Mergefield nested if problem

All,
I am working on a mergefield that displays a picture based on a merged
field's value.
The original i got had nested ifs and I am told it can go up to 10. I tried
to add 1 and it does not work (I added "test1")
What am I doing wrong? I think i must be missing an extra " or }, but am not
sure, if you are willing I can email or post the files somewhere for you to
take a look at
Thanks!!
Matthew Loraditch


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mergefield nested if problem

Show us the field construction that you are using.

To make it easy to get it into a post, see the following page of fellow MVP
Graham Mayor's website:

http://www.gmayor.com/export_field.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
All,
I am working on a mergefield that displays a picture based on a merged
field's value.
The original i got had nested ifs and I am told it can go up to 10. I
tried to add 1 and it does not work (I added "test1")
What am I doing wrong? I think i must be missing an extra " or }, but am
not sure, if you are willing I can email or post the files somewhere for
you to take a look at
Thanks!!
Matthew Loraditch




  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Matthew Loraditch Matthew Loraditch is offline
external usenet poster
 
Posts: 2
Default Mergefield nested if problem

Original:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF { MERGEFIELD
SLSP1 \* MERGEFORMAT } = "william" "picture3" ""} } }

My Version:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF { MERGEFIELD
SLSP1 \* MERGEFORMAT } = "william" "picture3" { IF { MERGEFIELD SLSP1 \*
MERGEFORMAT } = "william2" "picture4" ""} } } }

picturex is an image in the actual doc, up to william and picture 3 is the
original code, the william2 is my addition that doesn't work right, i need
up to 12 ifs for different people

Thanks for the help!
-matthew

"Doug Robbins - Word MVP" wrote in message
...
Show us the field construction that you are using.

To make it easy to get it into a post, see the following page of fellow
MVP Graham Mayor's website:

http://www.gmayor.com/export_field.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
All,
I am working on a mergefield that displays a picture based on a merged
field's value.
The original i got had nested ifs and I am told it can go up to 10. I
tried to add 1 and it does not work (I added "test1")
What am I doing wrong? I think i must be missing an extra " or }, but am
not sure, if you are willing I can email or post the files somewhere for
you to take a look at
Thanks!!
Matthew Loraditch





  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mergefield nested if problem

I would not try and do it that way. You should add a field to the data
source that contains the filename of the picture that you want to include
for each record.

See the "Graphics from data base" item under the "Special merges" section of
fellow MVP Cindy Meister's website at

http://homepage.swissonline.ch/cindy...r/MergFram.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
Original:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF { MERGEFIELD
SLSP1 \* MERGEFORMAT } = "william" "picture3" ""} } }

My Version:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF { MERGEFIELD
SLSP1 \* MERGEFORMAT } = "william" "picture3" { IF { MERGEFIELD SLSP1 \*
MERGEFORMAT } = "william2" "picture4" ""} } } }

picturex is an image in the actual doc, up to william and picture 3 is the
original code, the william2 is my addition that doesn't work right, i need
up to 12 ifs for different people

Thanks for the help!
-matthew

"Doug Robbins - Word MVP" wrote in message
...
Show us the field construction that you are using.

To make it easy to get it into a post, see the following page of fellow
MVP Graham Mayor's website:

http://www.gmayor.com/export_field.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
All,
I am working on a mergefield that displays a picture based on a merged
field's value.
The original i got had nested ifs and I am told it can go up to 10. I
tried to add 1 and it does not work (I added "test1")
What am I doing wrong? I think i must be missing an extra " or }, but am
not sure, if you are willing I can email or post the files somewhere for
you to take a look at
Thanks!!
Matthew Loraditch







  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mergefield nested if problem

I agree with Doug. The simplest way to do this would be to rename your
pictures (or copy your pictures and name them) to match the names of your
characters eg allison.jpg mark.jpg etc. Then you don't need a conditional
field of any kind. Use instead

{INCLUDEPICTURE "C:\\Path\\{MERGEFIELD SLSP}.jpg"}

The mergefield switches are in any case superfluous (and would be better
replaced by a lower case switch to ensure that the condition always matches
the data.

Had you wanted to retain the original names, there is no need to nest the
fields. Use a series of fields on the same line eg

{IF { MERGEFIELD SLSP1 \*Lower} = "allison" "{INCLUDEPICTURE
"c:\\path\\picture1.jpg"}"}{IF { MERGEFIELD SLSP1 \*Lower} = "mark"
"{INCLUDEPICTURE "c:\\path\\picture2.jpg"}"}{IF { MERGEFIELD SLSP1 \*Lower}
= "william" "{INCLUDEPICTURE "c:\\path\\picture3.jpg"}"}{IF { MERGEFIELD
SLSP1 \*Lower} = "william2" "{INCLUDEPICTURE "c:\\path\\picture4.jpg"}"}

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




Matthew Loraditch wrote:
Original:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" { IF
{ MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "william" "picture3" ""} } }

My Version:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" { IF
{ MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "william" "picture3" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "william2" "picture4" ""} } } }

picturex is an image in the actual doc, up to william and picture 3
is the original code, the william2 is my addition that doesn't work
right, i need up to 12 ifs for different people

Thanks for the help!
-matthew

"Doug Robbins - Word MVP" wrote in message
...
Show us the field construction that you are using.

To make it easy to get it into a post, see the following page of
fellow MVP Graham Mayor's website:

http://www.gmayor.com/export_field.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
All,
I am working on a mergefield that displays a picture based on a
merged field's value.
The original i got had nested ifs and I am told it can go up to 10.
I tried to add 1 and it does not work (I added "test1")
What am I doing wrong? I think i must be missing an extra " or },
but am not sure, if you are willing I can email or post the files
somewhere for you to take a look at
Thanks!!
Matthew Loraditch





  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
matthew loraditch matthew loraditch is offline
external usenet poster
 
Posts: 1
Default Mergefield nested if problem

Doug,
Is there a way to see what path the merge is constructing? I am getting red
x images, and I want to see what I am doing wrong.
Thanks!

"Doug Robbins - Word MVP" wrote in message
...
I would not try and do it that way. You should add a field to the data
source that contains the filename of the picture that you want to include
for each record.

See the "Graphics from data base" item under the "Special merges" section
of fellow MVP Cindy Meister's website at

http://homepage.swissonline.ch/cindy...r/MergFram.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
Original:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF { MERGEFIELD
SLSP1 \* MERGEFORMAT } = "william" "picture3" ""} } }

My Version:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF { MERGEFIELD
SLSP1 \* MERGEFORMAT } = "william" "picture3" { IF { MERGEFIELD SLSP1 \*
MERGEFORMAT } = "william2" "picture4" ""} } } }

picturex is an image in the actual doc, up to william and picture 3 is
the original code, the william2 is my addition that doesn't work right, i
need up to 12 ifs for different people

Thanks for the help!
-matthew

"Doug Robbins - Word MVP" wrote in message
...
Show us the field construction that you are using.

To make it easy to get it into a post, see the following page of fellow
MVP Graham Mayor's website:

http://www.gmayor.com/export_field.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
All,
I am working on a mergefield that displays a picture based on a merged
field's value.
The original i got had nested ifs and I am told it can go up to 10. I
tried to add 1 and it does not work (I added "test1")
What am I doing wrong? I think i must be missing an extra " or }, but
am not sure, if you are willing I can email or post the files somewhere
for you to take a look at
Thanks!!
Matthew Loraditch








  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mergefield nested if problem

Alt F9 will show the field construction. You need to merge to a new
document, select all (CTL+A) then F9 to update the fields.

--

Graham Mayor - Word MVP

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



matthew loraditch wrote:
Doug,
Is there a way to see what path the merge is constructing? I am
getting red x images, and I want to see what I am doing wrong.
Thanks!

"Doug Robbins - Word MVP" wrote in message
...
I would not try and do it that way. You should add a field to the
data source that contains the filename of the picture that you want
to include for each record.

See the "Graphics from data base" item under the "Special merges"
section of fellow MVP Cindy Meister's website at

http://homepage.swissonline.ch/cindy...r/MergFram.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
Original:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" {
IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "william" "picture3" ""} } }

My Version:
{ IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "allison" "pictures1" {
IF { MERGEFIELD SLSP1 \* MERGEFORMAT } = "mark" "picture2" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "william" "picture3" { IF {
MERGEFIELD SLSP1 \* MERGEFORMAT } = "william2" "picture4" ""} } } }

picturex is an image in the actual doc, up to william and picture 3
is the original code, the william2 is my addition that doesn't work
right, i need up to 12 ifs for different people

Thanks for the help!
-matthew

"Doug Robbins - Word MVP" wrote in message
...
Show us the field construction that you are using.

To make it easy to get it into a post, see the following page of
fellow MVP Graham Mayor's website:

http://www.gmayor.com/export_field.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

"Matthew Loraditch" wrote in message
...
All,
I am working on a mergefield that displays a picture based on a
merged field's value.
The original i got had nested ifs and I am told it can go up to
10. I tried to add 1 and it does not work (I added "test1")
What am I doing wrong? I think i must be missing an extra " or },
but am not sure, if you are willing I can email or post the files
somewhere for you to take a look at
Thanks!!
Matthew Loraditch



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
Field codes: MergeField field RTF format problem Amdious Mailmerge 4 September 17th 07 02:38 PM
Weird nested tables problem audreybmorin Tables 2 August 9th 07 02:00 PM
Nested Tables - printing problem on multiple pages Victor_alb Tables 0 April 3rd 07 06:36 AM
Problem Merging witn Nested Conditions Tom Bean Mailmerge 2 June 20th 06 10:09 PM
Word, mailmerge problem.{MERGEFIELD "First_Name"} prints, not nam. geneset Mailmerge 2 January 29th 05 11:45 AM


All times are GMT +1. The time now is 06:53 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"