Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If -Then-Else Statements in Word 2003
I have been reading all the posts regarding the use of Word Fields to
skip a field if the data is blank but I'm still having problems. I have two Mergefields on the same line County and PostCode. In some cases, like sending a letter to Australia, the County field is blank but the PostCode field contains data but when I merge the data, the whole line is blanked out. I have tried using the If-Then-Else statement as advised in various posts but I cannot save the revised field. AlI I end up with is the original mergefield. What I want to say is - [If County = "" show Post Code else County and PostCode] Could someone please advise how I should format this line and make it stay there. Thanks and Regards John |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If -Then-Else Statements in Word 2003
{ IF { MERGEFIELD Country } = "" { MERGEFIELD PostCode } "{ MERGEFIELD
Country } { MERGEFIELD PostCode }" } You must use Ctrl+F9 to insert each pair of field delimiters and Alt+F9 to toggle off their display. -- 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 "bxgti4x4" wrote in message ups.com... I have been reading all the posts regarding the use of Word Fields to skip a field if the data is blank but I'm still having problems. I have two Mergefields on the same line County and PostCode. In some cases, like sending a letter to Australia, the County field is blank but the PostCode field contains data but when I merge the data, the whole line is blanked out. I have tried using the If-Then-Else statement as advised in various posts but I cannot save the revised field. AlI I end up with is the original mergefield. What I want to say is - [If County = "" show Post Code else County and PostCode] Could someone please advise how I should format this line and make it stay there. Thanks and Regards John |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If -Then-Else Statements in Word 2003
{IF{Mergefield County} = "" "{Mergefield PostCode}" "{Mergefield County}
{Mergefield PostCode}"} Each pair of field boundaries {} is inserted with CTRL+F9. Type the rest. ALT+F9 to toggle the display. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org bxgti4x4 wrote: I have been reading all the posts regarding the use of Word Fields to skip a field if the data is blank but I'm still having problems. I have two Mergefields on the same line County and PostCode. In some cases, like sending a letter to Australia, the County field is blank but the PostCode field contains data but when I merge the data, the whole line is blanked out. I have tried using the If-Then-Else statement as advised in various posts but I cannot save the revised field. AlI I end up with is the original mergefield. What I want to say is - [If County = "" show Post Code else County and PostCode] Could someone please advise how I should format this line and make it stay there. Thanks and Regards John |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If -Then-Else Statements in Word 2003
Thanks Graham and Doug,
That did the trick, I think I was not closing the entry with Alt F9 Thanks for your help. Best Regards John On Mar 1, 3:25 pm, "Graham Mayor" wrote: {IF{Mergefield County} = "" "{Mergefield PostCode}" "{Mergefield County} {Mergefield PostCode}"} Each pair of field boundaries {} is inserted with CTRL+F9. Type the rest. ALT+F9 to toggle the display. -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org bxgti4x4 wrote: I have been reading all the posts regarding the use of Word Fields to skip a field if the data is blank but I'm still having problems. I have two Mergefields on the same line County and PostCode. In some cases, like sending a letter to Australia, the County field is blank but the PostCode field contains data but when I merge the data, the whole line is blanked out. I have tried using the If-Then-Else statement as advised in various posts but I cannot save the revised field. AlI I end up with is the original mergefield. What I want to say is - [If County = "" show Post Code else County and PostCode] Could someone please advise how I should format this line and make it stay there. Thanks and Regards John- Hide quoted text - - Show quoted text - |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If -Then-Else Statements in Word 2003
Hello Again,
I have been woking on the field but am finding the following problems: 1 No matter what I do, I end up with a space before the text is printed. How do I get rid of this? 2 I wish to put two spaces between County and PostCode but, again, no matter how many spaces I enter into the code, I still end up with only one between the two parts of the text. How do I space the two part out? So near and yet so far! Best Regards John On Mar 1, 4:36 pm, "bxgti4x4" wrote: Thanks Graham and Doug, That did the trick, I think I was not closing the entry with Alt F9 Thanks for your help. Best Regards John On Mar 1, 3:25 pm, "Graham Mayor" wrote: {IF{Mergefield County} = "" "{Mergefield PostCode}" "{Mergefield County} {Mergefield PostCode}"} Each pair of field boundaries {} is inserted with CTRL+F9. Type the rest. ALT+F9 to toggle the display. -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org bxgti4x4 wrote: I have been reading all the posts regarding the use of Word Fields to skip a field if the data is blank but I'm still having problems. I have two Mergefields on the same line County and PostCode. In some cases, like sending a letter to Australia, the County field is blank but the PostCode field contains data but when I merge the data, the whole line is blanked out. I have tried using the If-Then-Else statement as advised in various posts but I cannot save the revised field. AlI I end up with is the original mergefield. What I want to say is - [If County = "" show Post Code else County and PostCode] Could someone please advise how I should format this line and make it stay there. Thanks and Regards John- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If -Then-Else Statements in Word 2003
{ IF { MERGEFIELD Country } = "" { MERGEFIELD PostCode } "{ MERGEFIELD
Country }[ ]{ MERGEFIELD PostCode }" } If you have two spaces in place of the [ ] above, that is what you will get. You should not have { MERGEFIELD Country } anywhere else in the document except where it appears in the above construction. -- 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 "bxgti4x4" wrote in message ups.com... Hello Again, I have been woking on the field but am finding the following problems: 1 No matter what I do, I end up with a space before the text is printed. How do I get rid of this? 2 I wish to put two spaces between County and PostCode but, again, no matter how many spaces I enter into the code, I still end up with only one between the two parts of the text. How do I space the two part out? So near and yet so far! Best Regards John On Mar 1, 4:36 pm, "bxgti4x4" wrote: Thanks Graham and Doug, That did the trick, I think I was not closing the entry with Alt F9 Thanks for your help. Best Regards John On Mar 1, 3:25 pm, "Graham Mayor" wrote: {IF{Mergefield County} = "" "{Mergefield PostCode}" "{Mergefield County} {Mergefield PostCode}"} Each pair of field boundaries {} is inserted with CTRL+F9. Type the rest. ALT+F9 to toggle the display. -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org bxgti4x4 wrote: I have been reading all the posts regarding the use of Word Fields to skip a field if the data is blank but I'm still having problems. I have two Mergefields on the same line County and PostCode. In some cases, like sending a letter to Australia, the County field is blank but the PostCode field contains data but when I merge the data, the whole line is blanked out. I have tried using the If-Then-Else statement as advised in various posts but I cannot save the revised field. AlI I end up with is the original mergefield. What I want to say is - [If County = "" show Post Code else County and PostCode] Could someone please advise how I should format this line and make it stay there. Thanks and Regards John- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
#7
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If -Then-Else Statements in Word 2003
Thanks Doug, that worked OK. It was odd, I tried it before and it
didn't work - hence my previous post. Not sure what changed but all is well. Thanks very much for your help. Best Regards John On Mar 1, 9:25 pm, "Doug Robbins - Word MVP" wrote: { IF { MERGEFIELD Country } = "" { MERGEFIELD PostCode } "{ MERGEFIELD Country }[ ]{ MERGEFIELD PostCode }" } If you have two spaces in place of the [ ] above, that is what you will get. You should not have { MERGEFIELD Country } anywhere else in the document except where it appears in the above construction. -- 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 "bxgti4x4" wrote in message ups.com... Hello Again, I have been woking on the field but am finding the following problems: 1 No matter what I do, I end up with a space before the text is printed. How do I get rid of this? 2 I wish to put two spaces between County and PostCode but, again, no matter how many spaces I enter into the code, I still end up with only one between the two parts of the text. How do I space the two part out? So near and yet so far! Best Regards John On Mar 1, 4:36 pm, "bxgti4x4" wrote: Thanks Graham and Doug, That did the trick, I think I was not closing the entry with Alt F9 Thanks for your help. Best Regards John On Mar 1, 3:25 pm, "Graham Mayor" wrote: {IF{Mergefield County} = "" "{Mergefield PostCode}" "{Mergefield County} {Mergefield PostCode}"} Each pair of field boundaries {} is inserted with CTRL+F9. Type the rest. ALT+F9 to toggle the display. -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org bxgti4x4 wrote: I have been reading all the posts regarding the use of Word Fields to skip a field if the data is blank but I'm still having problems. I have two Mergefields on the same line County and PostCode. In some cases, like sending a letter to Australia, the County field is blank but the PostCode field contains data but when I merge the data, the whole line is blanked out. I have tried using the If-Then-Else statement as advised in various posts but I cannot save the revised field. AlI I end up with is the original mergefield. What I want to say is - [If County = "" show Post Code else County and PostCode] Could someone please advise how I should format this line and make it stay there. Thanks and Regards John- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to create cells in table using if statements in word | Mailmerge | |||
Nested If statements in MS Word 2003 - Help! | Mailmerge | |||
How do i use multiple IF statements in word 2000? | Mailmerge | |||
Word 2K: Conditional statements (if...then...else) in Merge files | Mailmerge | |||
Mail Merge If Statements (Word 02) | Mailmerge |