Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
How to ignore a feild in Mail Merge
I have created an address label for Mail Merge. Becasue I wish the City and
Post Code to be bold I have created an address block by inserting all the relevant fields. It works perfectly. However becasue a small % of the mailings are going outside the country the last field is "Country". I do not want it to print out if the country is "United Kingdom". I can see how to do this if I use AddressBlock but I do not know how to get at the fields within AddressBlock to change their properties. Just to complicate things my default country for Word is USA. I know I can work around the problem by doing a Find and Replace once the mereg is completed but I'm idle and want to automate it. Any help would be much appreciated. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
How to ignore a feild in Mail Merge
For the ADDRESSBLOCK
a. which version of Word are you using? If it's Word 2003, there should be an option in the AddressBlock field dialog box for "Only include the country/region if different than". However, you would also have to ensure that you have correctly mapped your country field to the relevant field (probably Country/Region) in Match fields. If it's Word 2002 I cannot remember if you get that option - certainly, the ADDRESSBLOCK was less capable. b. if you can't get ADDRESSBLOCK to work how you want quite quickly, I'd stick with the individual fields option. (Some would say "don't use the ADDRESSBLOCK", period.) Although you can change the behaviour of the "elements" inside the addressblock to an extent, the behaviour of the ADDRESSBLOCK is not fully documented and so modifications should not be regarded as supported. The behaviour of the "fields" in the first line in particular appears to be "hard-coded". Further, any changes you make manually will probably be lost the next time you modify the addressblock. The advantage of the ADDRESSBLOCK is, in theory, that it should get the general layout of the address right for each country. It's much more difficult to do that using individual fields unless a. you know what the layout should be or b. you use fields that already have the text laid out how you want. However, when it gets to the country you need something like { MERGEFIELD "mypreviousfield" }{ IF "{ MERGEFIELD country \*Upper }" = "UNITED KINGDOM" "" " { MERGEFIELD country }" } and for that to work all your United Kingdom addresses would have to be laid exactly as "United Kingdom", case variations OK, additional spaces, UK, U.K. not OK). Peter Jamieson "Andrew St-Johnston" wrote in message ... I have created an address label for Mail Merge. Becasue I wish the City and Post Code to be bold I have created an address block by inserting all the relevant fields. It works perfectly. However becasue a small % of the mailings are going outside the country the last field is "Country". I do not want it to print out if the country is "United Kingdom". I can see how to do this if I use AddressBlock but I do not know how to get at the fields within AddressBlock to change their properties. Just to complicate things my default country for Word is USA. I know I can work around the problem by doing a Find and Replace once the mereg is completed but I'm idle and want to automate it. Any help would be much appreciated. |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
How to ignore a feild in Mail Merge
Thank you for the quick response. Ihave been unsuccessful in modifying
AddressBlock so I am going to try plan B. I hope I am right in assuming that I just substutute your macro for the country field. "Peter Jamieson" wrote: For the ADDRESSBLOCK a. which version of Word are you using? If it's Word 2003, there should be an option in the AddressBlock field dialog box for "Only include the country/region if different than". However, you would also have to ensure that you have correctly mapped your country field to the relevant field (probably Country/Region) in Match fields. If it's Word 2002 I cannot remember if you get that option - certainly, the ADDRESSBLOCK was less capable. b. if you can't get ADDRESSBLOCK to work how you want quite quickly, I'd stick with the individual fields option. (Some would say "don't use the ADDRESSBLOCK", period.) Although you can change the behaviour of the "elements" inside the addressblock to an extent, the behaviour of the ADDRESSBLOCK is not fully documented and so modifications should not be regarded as supported. The behaviour of the "fields" in the first line in particular appears to be "hard-coded". Further, any changes you make manually will probably be lost the next time you modify the addressblock. The advantage of the ADDRESSBLOCK is, in theory, that it should get the general layout of the address right for each country. It's much more difficult to do that using individual fields unless a. you know what the layout should be or b. you use fields that already have the text laid out how you want. However, when it gets to the country you need something like { MERGEFIELD "mypreviousfield" }{ IF "{ MERGEFIELD country \*Upper }" = "UNITED KINGDOM" "" " { MERGEFIELD country }" } and for that to work all your United Kingdom addresses would have to be laid exactly as "United Kingdom", case variations OK, additional spaces, UK, U.K. not OK). Peter Jamieson "Andrew St-Johnston" wrote in message ... I have created an address label for Mail Merge. Becasue I wish the City and Post Code to be bold I have created an address block by inserting all the relevant fields. It works perfectly. However becasue a small % of the mailings are going outside the country the last field is "Country". I do not want it to print out if the country is "United Kingdom". I can see how to do this if I use AddressBlock but I do not know how to get at the fields within AddressBlock to change their properties. Just to complicate things my default country for Word is USA. I know I can work around the problem by doing a Find and Replace once the mereg is completed but I'm idle and want to automate it. Any help would be much appreciated. |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
How to ignore a feild in Mail Merge
I just substutute your macro for the country field.
More or less. All the {} have to be the special field codes you can insert using ctrl-F9 Peter Jamieson "Andrew St-Johnston" wrote in message ... Thank you for the quick response. Ihave been unsuccessful in modifying AddressBlock so I am going to try plan B. I hope I am right in assuming that I just substutute your macro for the country field. "Peter Jamieson" wrote: For the ADDRESSBLOCK a. which version of Word are you using? If it's Word 2003, there should be an option in the AddressBlock field dialog box for "Only include the country/region if different than". However, you would also have to ensure that you have correctly mapped your country field to the relevant field (probably Country/Region) in Match fields. If it's Word 2002 I cannot remember if you get that option - certainly, the ADDRESSBLOCK was less capable. b. if you can't get ADDRESSBLOCK to work how you want quite quickly, I'd stick with the individual fields option. (Some would say "don't use the ADDRESSBLOCK", period.) Although you can change the behaviour of the "elements" inside the addressblock to an extent, the behaviour of the ADDRESSBLOCK is not fully documented and so modifications should not be regarded as supported. The behaviour of the "fields" in the first line in particular appears to be "hard-coded". Further, any changes you make manually will probably be lost the next time you modify the addressblock. The advantage of the ADDRESSBLOCK is, in theory, that it should get the general layout of the address right for each country. It's much more difficult to do that using individual fields unless a. you know what the layout should be or b. you use fields that already have the text laid out how you want. However, when it gets to the country you need something like { MERGEFIELD "mypreviousfield" }{ IF "{ MERGEFIELD country \*Upper }" = "UNITED KINGDOM" "" " { MERGEFIELD country }" } and for that to work all your United Kingdom addresses would have to be laid exactly as "United Kingdom", case variations OK, additional spaces, UK, U.K. not OK). Peter Jamieson "Andrew St-Johnston" wrote in message ... I have created an address label for Mail Merge. Becasue I wish the City and Post Code to be bold I have created an address block by inserting all the relevant fields. It works perfectly. However becasue a small % of the mailings are going outside the country the last field is "Country". I do not want it to print out if the country is "United Kingdom". I can see how to do this if I use AddressBlock but I do not know how to get at the fields within AddressBlock to change their properties. Just to complicate things my default country for Word is USA. I know I can work around the problem by doing a Find and Replace once the mereg is completed but I'm idle and want to automate it. Any help would be much appreciated. |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
How to ignore a feild in Mail Merge
Thanks again
"Peter Jamieson" wrote: I just substutute your macro for the country field. More or less. All the {} have to be the special field codes you can insert using ctrl-F9 Peter Jamieson "Andrew St-Johnston" wrote in message ... Thank you for the quick response. Ihave been unsuccessful in modifying AddressBlock so I am going to try plan B. I hope I am right in assuming that I just substutute your macro for the country field. "Peter Jamieson" wrote: For the ADDRESSBLOCK a. which version of Word are you using? If it's Word 2003, there should be an option in the AddressBlock field dialog box for "Only include the country/region if different than". However, you would also have to ensure that you have correctly mapped your country field to the relevant field (probably Country/Region) in Match fields. If it's Word 2002 I cannot remember if you get that option - certainly, the ADDRESSBLOCK was less capable. b. if you can't get ADDRESSBLOCK to work how you want quite quickly, I'd stick with the individual fields option. (Some would say "don't use the ADDRESSBLOCK", period.) Although you can change the behaviour of the "elements" inside the addressblock to an extent, the behaviour of the ADDRESSBLOCK is not fully documented and so modifications should not be regarded as supported. The behaviour of the "fields" in the first line in particular appears to be "hard-coded". Further, any changes you make manually will probably be lost the next time you modify the addressblock. The advantage of the ADDRESSBLOCK is, in theory, that it should get the general layout of the address right for each country. It's much more difficult to do that using individual fields unless a. you know what the layout should be or b. you use fields that already have the text laid out how you want. However, when it gets to the country you need something like { MERGEFIELD "mypreviousfield" }{ IF "{ MERGEFIELD country \*Upper }" = "UNITED KINGDOM" "" " { MERGEFIELD country }" } and for that to work all your United Kingdom addresses would have to be laid exactly as "United Kingdom", case variations OK, additional spaces, UK, U.K. not OK). Peter Jamieson "Andrew St-Johnston" wrote in message ... I have created an address label for Mail Merge. Becasue I wish the City and Post Code to be bold I have created an address block by inserting all the relevant fields. It works perfectly. However becasue a small % of the mailings are going outside the country the last field is "Country". I do not want it to print out if the country is "United Kingdom". I can see how to do this if I use AddressBlock but I do not know how to get at the fields within AddressBlock to change their properties. Just to complicate things my default country for Word is USA. I know I can work around the problem by doing a Find and Replace once the mereg is completed but I'm idle and want to automate it. Any help would be much appreciated. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using if fields in mail merge to ignore empty fields | Mailmerge | |||
required feild | Microsoft Word Help | |||
Mail Merge - automatic from flat file - how to ignore messages | Mailmerge | |||
Merge Feild duplicating for 50+ pages | Mailmerge | |||
Why do mail merges in word ignore * wildcards in access queries | Mailmerge |