Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Hello everyone,
I have the same problem as the post on 12/8/05 "Data fields in mail merge", so I will use their elequent words... "I have a Word mail merge document, used to import Excel data - only dates. When I have merged the data, all empty Excel date cells are populated in Word by 12:00AM." I then tried the fix for it..... Use { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } But this did not work. Any suggestions? |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
What was the result?
Did you use Ctrl+F9 to insert each pair of field delimiters {}? The formatting switch should be \@ "dd/MM/yyyy" You may be able to fix the problem by selecting Options from the Tools menu in Word and then go to the General tab and check the box against "Confirm conversions at open" Then, when you attach the data source to the mail merge main document, use the DDE option. Alternatively, use the following field construction: { IF { MERGEFIELD contract_received } "12:00AM" { MERGEFIELD contract_received \@ "dd/MM/yyyy" } "" } I am not sure that 12:00AM is exactly what is now being displayed when the field is empty, so you should replace that what is actually being displayed. -- 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 "pama" wrote in message ... Hello everyone, I have the same problem as the post on 12/8/05 "Data fields in mail merge", so I will use their elequent words... "I have a Word mail merge document, used to import Excel data - only dates. When I have merged the data, all empty Excel date cells are populated in Word by 12:00AM." I then tried the fix for it..... Use { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } But this did not work. Any suggestions? |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
The problem is that the fields are not empty - they are reproducing
12:00AM - so you need to modify the condition to search for that { IF { MERGEFIELD contract_received } "12:00*" "{ MERGEFIELD contract_received \@ "dd/MM/yyyy" }" } should do the trick - or put *exactly* what the 'empty' fields produce in place of 12:00* above. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org pama wrote: Hello everyone, I have the same problem as the post on 12/8/05 "Data fields in mail merge", so I will use their elequent words... "I have a Word mail merge document, used to import Excel data - only dates. When I have merged the data, all empty Excel date cells are populated in Word by 12:00AM." I then tried the fix for it..... Use { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } But this did not work. Any suggestions? |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Thanks for your help Doug and Graham.
There are several potential "go arounds" like the IF statement: { IF { MERGEFIELD contract_received } "12:00" { MERGEFIELD contract_received \@ "dd/MM/yyyy" }""} which did finally work. The problem with the original if statement: { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } is that Word does not see that field as blank, so it will always format "something" as a date, such as the current date. But putting 12:00 (even without all the formatting such as 12:00:00 AM) worked. Still, that is going around the problem. What fixed the problem entirely was merging with the DDE option. This makes Word behave as you would expect in this case. Thank you again. Pascale. "Doug Robbins - Word MVP" wrote: What was the result? Did you use Ctrl+F9 to insert each pair of field delimiters {}? The formatting switch should be \@ "dd/MM/yyyy" You may be able to fix the problem by selecting Options from the Tools menu in Word and then go to the General tab and check the box against "Confirm conversions at open" Then, when you attach the data source to the mail merge main document, use the DDE option. Alternatively, use the following field construction: { IF { MERGEFIELD contract_received } "12:00AM" { MERGEFIELD contract_received \@ "dd/MM/yyyy" } "" } I am not sure that 12:00AM is exactly what is now being displayed when the field is empty, so you should replace that what is actually being displayed. -- 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 "pama" wrote in message ... Hello everyone, I have the same problem as the post on 12/8/05 "Data fields in mail merge", so I will use their elequent words... "I have a Word mail merge document, used to import Excel data - only dates. When I have merged the data, all empty Excel date cells are populated in Word by 12:00AM." I then tried the fix for it..... Use { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } But this did not work. Any suggestions? |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Only problem is that while DDE often works, it is not reliable, which is one
reason why Microsoft moved away from it. The conditional field always works. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org pama wrote: Thanks for your help Doug and Graham. There are several potential "go arounds" like the IF statement: { IF { MERGEFIELD contract_received } "12:00" { MERGEFIELD contract_received \@ "dd/MM/yyyy" }""} which did finally work. The problem with the original if statement: { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } is that Word does not see that field as blank, so it will always format "something" as a date, such as the current date. But putting 12:00 (even without all the formatting such as 12:00:00 AM) worked. Still, that is going around the problem. What fixed the problem entirely was merging with the DDE option. This makes Word behave as you would expect in this case. Thank you again. Pascale. "Doug Robbins - Word MVP" wrote: What was the result? Did you use Ctrl+F9 to insert each pair of field delimiters {}? The formatting switch should be \@ "dd/MM/yyyy" You may be able to fix the problem by selecting Options from the Tools menu in Word and then go to the General tab and check the box against "Confirm conversions at open" Then, when you attach the data source to the mail merge main document, use the DDE option. Alternatively, use the following field construction: { IF { MERGEFIELD contract_received } "12:00AM" { MERGEFIELD contract_received \@ "dd/MM/yyyy" } "" } I am not sure that 12:00AM is exactly what is now being displayed when the field is empty, so you should replace that what is actually being displayed. -- 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 "pama" wrote in message ... Hello everyone, I have the same problem as the post on 12/8/05 "Data fields in mail merge", so I will use their elequent words... "I have a Word mail merge document, used to import Excel data - only dates. When I have merged the data, all empty Excel date cells are populated in Word by 12:00AM." I then tried the fix for it..... Use { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } But this did not work. Any suggestions? |
#6
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
OK, how would DDE be unreliable? If you don't mind giving a brief explantion.
"Graham Mayor" wrote: Only problem is that while DDE often works, it is not reliable, which is one reason why Microsoft moved away from it. The conditional field always works. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org pama wrote: Thanks for your help Doug and Graham. There are several potential "go arounds" like the IF statement: { IF { MERGEFIELD contract_received } "12:00" { MERGEFIELD contract_received \@ "dd/MM/yyyy" }""} which did finally work. The problem with the original if statement: { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } is that Word does not see that field as blank, so it will always format "something" as a date, such as the current date. But putting 12:00 (even without all the formatting such as 12:00:00 AM) worked. Still, that is going around the problem. What fixed the problem entirely was merging with the DDE option. This makes Word behave as you would expect in this case. Thank you again. Pascale. "Doug Robbins - Word MVP" wrote: What was the result? Did you use Ctrl+F9 to insert each pair of field delimiters {}? The formatting switch should be \@ "dd/MM/yyyy" You may be able to fix the problem by selecting Options from the Tools menu in Word and then go to the General tab and check the box against "Confirm conversions at open" Then, when you attach the data source to the mail merge main document, use the DDE option. Alternatively, use the following field construction: { IF { MERGEFIELD contract_received } "12:00AM" { MERGEFIELD contract_received \@ "dd/MM/yyyy" } "" } I am not sure that 12:00AM is exactly what is now being displayed when the field is empty, so you should replace that what is actually being displayed. -- 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 "pama" wrote in message ... Hello everyone, I have the same problem as the post on 12/8/05 "Data fields in mail merge", so I will use their elequent words... "I have a Word mail merge document, used to import Excel data - only dates. When I have merged the data, all empty Excel date cells are populated in Word by 12:00AM." I then tried the fix for it..... Use { IF { MERGEFIELD contract_received } "" { MERGEFIELD contract_received \@"DD/MM/YYYY" } "" } But this did not work. Any suggestions? |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Skip mail merge fields from Excel Workbook when blank/zero | New Users | |||
Skip mail merge fields from Excel when blank/zero | Mailmerge | |||
Keep formating when mail merging from excel to word address labe | Mailmerge | |||
How do I stop losing formtext fields when mail merging a document | Mailmerge | |||
How can I maintain Excel date formats in a mail merge? | Mailmerge |