![]() |
#1
|
|||
|
|||
![]()
Hello,
I'm having a problem while using the Mergefield function in word. I need to fill in a couple of dates from an excelfile into word (Date1, Date2 and Date3). The format I want to use is dd/MM/yyyy, for all 3 dates. I have changed my language setting in the control panel to read 'English'. This is how my excelfile looks like: Product_______Date1________Date2_______Date3 STR_______02/04/2010____03/04/2010____23/04/2010 FWD______02/04/2010_____03/04/2010 STR_______02/04/2010____03/04/2010____09/04/2010 Then, my word file has to be filled in, based on the column 'Product' (there are 3 possibilities), e.g.: Line1. {MERGEFIELD Date1 \@ "dd/MM/yyyy"} Line2. {IF {MERGEFIELD Product} = "FWD" "{MERGEFIELD Date2\@ "dd/MM/yyyy"}" {IF{MERGEFIELD Product }= "STR" "{MERGEFIELD Date2\@ "dd/MM/yyyy"}"{IF{MERGEFIELD Product }= "SWF" "random text"}}} Line3. {IF {MERGEFIELD Product} = "FWD" "random text" {IF{MERGEFIELD Product }= "STR" "{MERGEFIELD Date3\@ "dd/MM/yyyy"}"{IF{MERGEFIELD Product }= "SWF" "random text"}}} Line 1 and 2 work like a charm. Line 3 is the problem. It works perfectly for Product 'FWD' and 'SWF', but Word inverts Date3 in some cases! When a day is less then 13, the date gets format MM/dd/yyyy instead of dd/MM/yyyy. It seems like Word checks if it is possible to switch the day and month. Values I get for Line3 in word for the different fields in excel: -> 23/04/2010 (as it should be) -> random text (okay as well) -> 04/09/2010 (this should be 09/04/2010) I have no idea why this happens, and why this only happens for Line3!?! Does anybody have a solution for this? Thanks in advance! Michiel |
#2
|
|||
|
|||
![]()
Why do I see 'Solved'? I didn't click this, and I don't have a solution for this problem
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
windseaker | Excel | 1 | 02-14-2010 01:44 AM |
Runtime error 5487 - Word cannot complete the save to to file permission error | franferns | Word | 0 | 11-25-2009 05:35 AM |
Receive error cannot open this form because an error occurred in BCM 2007 | bornhusker | Outlook | 0 | 06-01-2009 10:28 AM |
new appointment date always reverts back to today's date | msills | Outlook | 0 | 08-24-2007 08:57 AM |
![]() |
promark | Outlook | 1 | 12-23-2005 07:21 AM |