![]() |
#2
|
|||
|
|||
![]()
There is no date picker in 2003. You can add a calendar control and some VBA to insert the selected date in the document.
The calendar control can be found at Insert > Object > Calendar control To do the VBA, start by typing 11 characters in the doc where you want the date to be displayed (these 11 characters will be replaced by the date). Turn on the macro recorder and press Ctrl+Home to go to the top of the doc, then use the keyboard to navigate to and select the 11 characters. Turn off the recorder. View the macro code and copy the lines that start with "Selection" Exit the code window Double click on the calendar control Between the Private Sub and End Sub lines, paste the lines from the previous macro Just before the End Sub line, add this line: Code:
Selection.Text = Format(Calendar1.Value, "mmm dd yyyy") Code:
Private Sub Calendar1_Click() Selection.HomeKey Unit:=wdStory Selection.MoveDown Unit:=wdLine, Count:=10 Selection.MoveRight Unit:=wdCharacter, Count:=11, Extend:=wdExtend Selection.Text = Format(Calendar1.Value, "mmm dd yyyy") End Sub Exit design mode of the Calendar Control Test If it works, delete the original macro that you recorded. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculations using values from date picker controls | Inkarnate | Word | 0 | 06-09-2010 07:16 AM |
Date Function in word? | aligahk06 | Word | 1 | 04-21-2010 06:33 AM |
Word 2007 date and time picker | dmcohio | Word | 2 | 04-09-2010 04:13 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 |