Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge with "If" statement producing unexpected results
Hi there
I'm using the below code for my mail merge. Problem is that when there is a "/" in the Street1 or Street2 fields, I get a bunch of characters on that line that shouldn't be there. Can anyone shed any light as to what might be going wrong - I built this statement by looking around on the net - I'm very much a novice when it comes to this stuff. If it is relevant, I'm using Word 2003 with the data being pulled from an Excel 2003 spreadsheet. Thanks Griffo |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge with "If" statement producing unexpected results
"Griffo" wrote: Hi there I'm using the below code for my mail merge. Problem is that when there is a "/" in the Street1 or Street2 fields, I get a bunch of characters on that line that shouldn't be there. Can anyone shed any light as to what might be going wrong - I built this statement by looking around on the net - I'm very much a novice when it comes to this stuff. If it is relevant, I'm using Word 2003 with the data being pulled from an Excel 2003 spreadsheet. EDIT - here is the code! { if { MERGEFIELD "ShipToName" } = "same as billing" "{ADDRESSBLOCK \F" _FIRST0__LAST0__SUFFIX0_ _STREET1_ _STREET2_ _CITY_, _STATE_ _POSTAL_" \l 1033 \c 0 \e "" \* UPPER }" "{MERGEFIELD "ShipToName" \* UPPER } { MERGEFIELD "ShipToAddress1" \* UPPER } { MERGEFIELD "ShipToAddress2" \* UPPER } { MERGEFIELD "ShipToCity" \* UPPER } { MERGEFIELD "ShipToState" \* UPPER } { MERGEFIELD "ShipToPostalCode" }"} Thanks Griffo |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge with "If" statement producing unexpected results
Try doing it without using the AddressBlock field. Instead, just insert the
actual mergefields in the configuration that you want them. -- 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, originally posted via msnews.microsoft.com "Griffo" wrote in message ... "Griffo" wrote: Hi there I'm using the below code for my mail merge. Problem is that when there is a "/" in the Street1 or Street2 fields, I get a bunch of characters on that line that shouldn't be there. Can anyone shed any light as to what might be going wrong - I built this statement by looking around on the net - I'm very much a novice when it comes to this stuff. If it is relevant, I'm using Word 2003 with the data being pulled from an Excel 2003 spreadsheet. EDIT - here is the code! { if { MERGEFIELD "ShipToName" } = "same as billing" "{ADDRESSBLOCK \F" _FIRST0__LAST0__SUFFIX0_ _STREET1_ _STREET2_ _CITY_, _STATE_ _POSTAL_" \l 1033 \c 0 \e "" \* UPPER }" "{MERGEFIELD "ShipToName" \* UPPER } { MERGEFIELD "ShipToAddress1" \* UPPER } { MERGEFIELD "ShipToAddress2" \* UPPER } { MERGEFIELD "ShipToCity" \* UPPER } { MERGEFIELD "ShipToState" \* UPPER } { MERGEFIELD "ShipToPostalCode" }"} Thanks Griffo |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unexpected results in mailmerge | Mailmerge | |||
Multiple "OR" statements in a single "IF" statement | Mailmerge | |||
i get "an unexpected error ocurred" message when sending dist li | Microsoft Word Help | |||
I try to send email and I get "an unexpected error" message | Microsoft Word Help | |||
How do I use an "IF" statement in Mailmerge? | Mailmerge |