Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Date Format
Is there a way to have date separators applied automatically in a word form
field without having to type the slashes (i.e. 00/00/00)? I know it will apply them if you use a "createdate" or other like field but I prefer to have the ability to enter the date manually but would like to have the slashes entered without my having to type them. Thank you for any help provided -- Dewayne |
#2
|
|||
|
|||
If you are trying to avoid typing a date separator, such as a hyphen
or forward slash, then you can create a create a macro and attach it to the OnExit event of the form field to create the date format you want and return the result to the form field. The Format function would be the easiest way but there are other alternatives. Note you would need to use a Text data type instead of a Date data type for the form field so if you want to make sure you are using a valid date your macro would need to include the date validation. And, of course, you would want to accommodate the possibility of editing the date after it has been formatted to avoid macro errors. -- Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged. ~~~~~~~~~~~~~~~ Beth Melton Microsoft Office MVP Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/ "Dewayne" wrote in message news Is there a way to have date separators applied automatically in a word form field without having to type the slashes (i.e. 00/00/00)? I know it will apply them if you use a "createdate" or other like field but I prefer to have the ability to enter the date manually but would like to have the slashes entered without my having to type them. Thank you for any help provided -- Dewayne |
#3
|
|||
|
|||
Thank you for the help Beth
"Beth Melton" wrote: If you are trying to avoid typing a date separator, such as a hyphen or forward slash, then you can create a create a macro and attach it to the OnExit event of the form field to create the date format you want and return the result to the form field. The Format function would be the easiest way but there are other alternatives. Note you would need to use a Text data type instead of a Date data type for the form field so if you want to make sure you are using a valid date your macro would need to include the date validation. And, of course, you would want to accommodate the possibility of editing the date after it has been formatted to avoid macro errors. -- Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged. ~~~~~~~~~~~~~~~ Beth Melton Microsoft Office MVP Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/ "Dewayne" wrote in message news Is there a way to have date separators applied automatically in a word form field without having to type the slashes (i.e. 00/00/00)? I know it will apply them if you use a "createdate" or other like field but I prefer to have the ability to enter the date manually but would like to have the slashes entered without my having to type them. Thank you for any help provided -- Dewayne |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Send document as attachment changes default Outlook format | Microsoft Word Help | |||
How do I insert and format part of a data field in a Word document | Microsoft Word Help | |||
time format in comments on changes | Microsoft Word Help | |||
How do I creat a diary date in Outlook from a date in a Word | Microsoft Word Help | |||
Stamping documents with date & time | Microsoft Word Help |