Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
emilydoggy
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The WordPerfect "Reveal Codes" method is so much easier to use. Torden Microsoft Word Help 8 April 19th 10 07:50 PM
Word2000 letterhead merge BAW Mailmerge 3 June 25th 05 01:17 PM
Underscore (_) will not always display in RTF files (Word 2002). David A Edge Microsoft Word Help 6 June 14th 05 10:39 AM
is word perfect compatible with office word? Noreen Microsoft Word Help 1 May 11th 05 11:17 PM
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM


All times are GMT +1. The time now is 04:38 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"