PDA

View Full Version : Solved: Date Format in a word fill-in form



ctengelen
05-31-2006, 11:34 AM
Hi you wonderful Gurus of Macros!

I have a unique (or maybe not) problem. My form has text form fields, some of them are date related. I set the date format a certain way:
*YY-MM-DD* This works fine as long as the user has his/her date format set with the year to appear first. If not, the date changes to whichever way their Word Software is set. I even had one really odd thing happen, once the date was entered and you tapped over it again, it changed the format.

To make a long story short, is there any way that I can add to my "AutoNew" macro a code that will set the date the way I need it??? :dunno

Thanks for all of your help.

Trudy

fumei
05-31-2006, 09:33 PM
Are you asking for a way to bypass the regional settings of the users's computer? I mean, to ignore the way their computer is set for dates, and display it your way anyway?

ctengelen
06-01-2006, 07:22 AM
Hi Gerry,

Yes, actually I am. But I don't think this is possible from a Word Macro. Am I right?

Trudy

blake.arnold
06-01-2006, 09:19 AM
I don't know if this will help but here it is. http://gregmaxey.mvps.org/Date_Time_Stamp.htm

If that link does not help you then please answer the below questions.

Now is this a date in the document body, title or somewhere else? And is it being over-ridden by the Windows date format or the Word date format?

ctengelen
06-01-2006, 09:55 AM
The date is in the document body. It is a form with numerous Text Form Fields, some of them are set for dates (dates from and to). I have set the fields with the certain date format. This format is overridden by the Windows date format. I am certain, because on those network users that I know this happened, I changed the 'Regional Settings Date' to reflect the date format I want and the format was not overridden again.

Trudy

fumei
06-02-2006, 05:35 AM
I am, in principle, against changing a user's personal settings. That being said, you could change it, but if you do, change it back when you are done!

ctengelen
06-07-2006, 06:18 AM
Hi Gerry,

Sorry for the late reply - I was on a few days off enjoying the wonderful weather in my garden.

We have a policy for the date format, Year, Month, Day, that MUST be strictly followed to avoid confusion (today: 06 06 07 - which is day, which is year??) So, all settings on the individual will have to stay the same once set. I found a way around it in that we posted an e-mail to all users on how to change the settings on each individual profile. But for the future - is there a way to change those Windows settings from within Word???

Thanks again for all your help.

Trudy

fumei
06-07-2006, 06:43 PM
This should be done as official policy, and set formally by your network people. If there IS a policy, then the responsibility to set it is the network people. This should not be done by Word macros.

ctengelen
06-09-2006, 12:09 PM
That us what I thought. Since all of the hundreds of users have all been set up already - it is a training issue for us at this time. New users will have to be set properly.

Thanks again for all your time in this matter.

Trudy:friends: