Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Reformat dates in Word column
I have created a table in Microsoft Word 2000.
One column of this table contains only dates. The dates in this column are written in various formats such as: 11/2/05 or 2-Nov-05. I would like to convert all the dates in this column to one single format. I know how to select the format of new date entries but I would like to select my "date" column and change all the dates to a similar format. Thanks, e_d |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Reformat dates in Word column
Use the following code in a macro that you run when the selection is in the
column containing the dates: Dim i As Long, j As Long, drange As Range j = Selection.Information(wdEndOfRangeColumnNumber) With Selection.Tables(1) For i = 1 To Selection.Tables(1).Rows.Count Set drange = .Cell(i, j).Range drange.End = drange.End - 1 If IsDate(drange) Then drange = Format(drange, "MMMM dd, yyyy") 'Change the format string here to get what you want. End If Next i End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "emilydoggy" wrote in message ... I have created a table in Microsoft Word 2000. One column of this table contains only dates. The dates in this column are written in various formats such as: 11/2/05 or 2-Nov-05. I would like to convert all the dates in this column to one single format. I know how to select the format of new date entries but I would like to select my "date" column and change all the dates to a similar format. Thanks, e_d |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
The WordPerfect "Reveal Codes" method is so much easier to use. | Microsoft Word Help | |||
Word2000 letterhead merge | Mailmerge | |||
Underscore (_) will not always display in RTF files (Word 2002). | Microsoft Word Help | |||
is word perfect compatible with office word? | Microsoft Word Help | |||
Macros - Keyboard Commands | Microsoft Word Help |