Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
griffo griffo is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
griffo griffo is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP on news.microsoft.com Doug Robbins - Word MVP on news.microsoft.com is offline
external usenet poster
 
Posts: 407
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected results in mailmerge dan Mailmerge 3 March 10th 09 07:54 AM
Multiple "OR" statements in a single "IF" statement [email protected] Mailmerge 0 June 22nd 06 12:39 PM
i get "an unexpected error ocurred" message when sending dist li Wen Microsoft Word Help 0 March 7th 06 09:59 PM
I try to send email and I get "an unexpected error" message Carlos2229 Microsoft Word Help 0 February 19th 06 02:11 PM
How do I use an "IF" statement in Mailmerge? Mia Mailmerge 3 November 9th 05 09:48 PM


All times are GMT +1. The time now is 03:26 PM.

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"