Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2010, 03:08 AM
michielvanderbiest michielvanderbiest is offline Mergefield date error Windows 2K Mergefield date error Office 2003
Novice
Mergefield date error
 
Join Date: Apr 2010
Posts: 2
michielvanderbiest is on a distinguished road
Default Mergefield date error

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
Reply With Quote
  #2  
Old 04-12-2010, 11:22 PM
michielvanderbiest michielvanderbiest is offline Mergefield date error Windows 2K Mergefield date error Office 2003
Novice
Mergefield date error
 
Join Date: Apr 2010
Posts: 2
michielvanderbiest is on a distinguished road
Default

Why do I see 'Solved'? I didn't click this, and I don't have a solution for this problem
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mergefield date error Julian Date 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
Mergefield date error Imported message date change to today's date promark Outlook 1 12-23-2005 07:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft