M
Michael Lehmann
http://support.microsoft.com/default.aspx?scid=211303
{ If { MERGESEQ } = "1" "xxxxx { MERGEFIELD City }" ""}<ENTER>
{ SET Place1 { MERGEFIELD City }}<ENTER>
{ If { Place2 } <> { Place1 }"<ENTER>
----------------------------Page Break--------------------------------
xxxxx { MERGEFIELD City }<ENTER>
<ENTER>
yyyyy { MERGEFIELD Employee }{ MERGEFIELD Sales }" "yyyyy { MERGEFIELD
Employee }{ MERGEFIELD Sales }" }{ SET Place2 { MERGEFIELD City
}}<ENTER>
I have inserted xxxxx and yyyyy to show you that there is redundant
information. That is bad programming style. This isn't just a
theoretical problem. In my use there is text with layout for x and y.
It is annoying and error prone to handle these twice.
To avoid the redundany for y, just put it out of the IF.
{ If { MERGESEQ } = "1" "xxxxx { MERGEFIELD City }" ""}<ENTER>
{ SET Place1 { MERGEFIELD City }}<ENTER>
{ If { Place2 } <> { Place1 }"<ENTER>
----------------------------Page Break--------------------------------
xxxxx { MERGEFIELD City }<ENTER>
<ENTER>
" "" }
yyyyy { MERGEFIELD Employee }{ MERGEFIELD Sales }{ SET Place2 {
MERGEFIELD City }}<ENTER>
How can I avoid the redundancy for x? At the start the varaible Place2
is not bound. Which if-clause can handle this?
Why isn't this handled in the catalog function itsself. Just let the
user choose the field (one or more) for the category, no programming,
he just use the fields as an ordinary mail merge.
BTW: There is a bug in comparing. If Place1 and Place2 are both text
starting with the same number but different text afterwards, the if
treats them as equal. My workaround is:
SET Place1 "a{ MERGEFIELD City }" and for Place2 later the same.
{ If { MERGESEQ } = "1" "xxxxx { MERGEFIELD City }" ""}<ENTER>
{ SET Place1 { MERGEFIELD City }}<ENTER>
{ If { Place2 } <> { Place1 }"<ENTER>
----------------------------Page Break--------------------------------
xxxxx { MERGEFIELD City }<ENTER>
<ENTER>
yyyyy { MERGEFIELD Employee }{ MERGEFIELD Sales }" "yyyyy { MERGEFIELD
Employee }{ MERGEFIELD Sales }" }{ SET Place2 { MERGEFIELD City
}}<ENTER>
I have inserted xxxxx and yyyyy to show you that there is redundant
information. That is bad programming style. This isn't just a
theoretical problem. In my use there is text with layout for x and y.
It is annoying and error prone to handle these twice.
To avoid the redundany for y, just put it out of the IF.
{ If { MERGESEQ } = "1" "xxxxx { MERGEFIELD City }" ""}<ENTER>
{ SET Place1 { MERGEFIELD City }}<ENTER>
{ If { Place2 } <> { Place1 }"<ENTER>
----------------------------Page Break--------------------------------
xxxxx { MERGEFIELD City }<ENTER>
<ENTER>
" "" }
yyyyy { MERGEFIELD Employee }{ MERGEFIELD Sales }{ SET Place2 {
MERGEFIELD City }}<ENTER>
How can I avoid the redundancy for x? At the start the varaible Place2
is not bound. Which if-clause can handle this?
Why isn't this handled in the catalog function itsself. Just let the
user choose the field (one or more) for the category, no programming,
he just use the fields as an ordinary mail merge.
BTW: There is a bug in comparing. If Place1 and Place2 are both text
starting with the same number but different text afterwards, the if
treats them as equal. My workaround is:
SET Place1 "a{ MERGEFIELD City }" and for Place2 later the same.