Formatting - dates

  • Thread starter Thread starter Gerald
  • Start date Start date
G

Gerald

Is there a way when dates are pasted into a document that they are displayed
in a preselected formatted i.e. dd-mmm-yyyy and override the 'paste format'?

Thanks


Gerald
 
If you mean you've copied dates from another document in a some date
format, say, December 1, 2003, and you want them to change to a
different format as you paste them, say 12/1/03? To do this you would
need to paste them, then do a search and replace to change the date
format. In the example I just gave, first display the field codes
(Alt+F9). Then do a search for MMMM d, yyyy and replace by M/d/yy.
Then update all fields by selecting them all and pressing F9. If you're
doing this a lot you may want to record a macro of the steps.

By the way, if you work with fields a lot, you may want to install this
macro which updates all fields in the document without having to select
them. It's a feature Word ought to have but doesn't.

Sub UpdateAllFields()
' Updates all fields in document including Headers/Footers.

Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
Next oStory

End Sub

Larry
 
Back
Top