Reply
 
Thread Tools Display Modes
  #1   Report Post  
emilydoggy
 
Posts: n/a
Default Want all dates in row of a table formatted alike.

I have a table created in Microsoft Word.

One column of the table contains dates of varying formats:
25-Mar-2005
03/25/05
March 25, 2005.

I would like to batch donvert the column of dates so that they all use the
the same format.

Thanks.
  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

Sorry, Em. Word doesn't support "date formats". Try copying them into Excel,
then formatting, then bringing back to Word. But I'm not sure that'll work
either.
*******************
~Anne Troy

www.OfficeArticles.com


"emilydoggy" wrote in message
...
I have a table created in Microsoft Word.

One column of the table contains dates of varying formats:
25-Mar-2005
03/25/05
March 25, 2005.

I would like to batch donvert the column of dates so that they all use the
the same format.

Thanks.



  #3   Report Post  
Jay Freedman
 
Posts: n/a
Default

On Wed, 20 Jul 2005 15:27:03 -0700, "emilydoggy"
wrote:

I have a table created in Microsoft Word.

One column of the table contains dates of varying formats:
25-Mar-2005
03/25/05
March 25, 2005.

I would like to batch donvert the column of dates so that they all use the
the same format.

Thanks.


You may be able to use a macro like this (see
http://www.gmayor.com/installing_macro.htm if needed):

Sub ReformatDates()
Dim oCell As Cell
Dim oRg As Range

' adjust the table and column indexes as needed...
For Each oCell In ActiveDocument.Tables(1).Columns(2).Cells
Set oRg = oCell.Range
oRg.MoveEnd wdCharacter, -1
With oRg
If IsDate(.Text) Then
' adjust the formatting string as needed...
.Text = Format(CDate(.Text), "MM/dd/YYYY")
End If
End With
Next oCell
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
  #4   Report Post  
Jean-Guy Marcil
 
Posts: n/a
Default

Anne Troy was telling us:
Anne Troy nous racontait que :

Sorry, Em. Word doesn't support "date formats". Try copying them into


Sure it does, ever heard of Insert Date and Time... ? Have you seen how
many formats are available there? They are even language specific.

Excel, then formatting, then bringing back to Word. But I'm not sure
that'll work either.


I would suggest that you try out simple stuff like this instead of
recommending it untested.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
ISTOO
Word MVP site:
http://www.word.mvps.org



  #5   Report Post  
Anne Troy
 
Posts: n/a
Default

Then how does she convert all these dates that exist to the same format?
*******************
~Anne Troy

www.OfficeArticles.com


"Jean-Guy Marcil" wrote in message
...
Anne Troy was telling us:
Anne Troy nous racontait que :

Sorry, Em. Word doesn't support "date formats". Try copying them into


Sure it does, ever heard of Insert Date and Time... ? Have you seen how
many formats are available there? They are even language specific.

Excel, then formatting, then bringing back to Word. But I'm not sure
that'll work either.


I would suggest that you try out simple stuff like this instead of
recommending it untested.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
ISTOO
Word MVP site:
http://www.word.mvps.org







  #6   Report Post  
Doug Robbins
 
Posts: n/a
Default

Dim i As Long, j As Long, drange As Range, dtable As Table
Set dtable = Selection.Tables(1)
j = Selection.Information(wdEndOfRangeColumnNumber)
For i = 2 To dtable.Rows.Count
Set drange = dtable.Cell(i, j).Range
drange.End = drange.End - 1
drange.Text = Format(drange.Text, "dddd, MMMM d, yyyy")
Next i


--
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
"Anne Troy" wrote in message
...
Then how does she convert all these dates that exist to the same format?
*******************
~Anne Troy

www.OfficeArticles.com


"Jean-Guy Marcil" wrote in message
...
Anne Troy was telling us:
Anne Troy nous racontait que :

Sorry, Em. Word doesn't support "date formats". Try copying them into


Sure it does, ever heard of Insert Date and Time... ? Have you seen how
many formats are available there? They are even language specific.

Excel, then formatting, then bringing back to Word. But I'm not sure
that'll work either.


I would suggest that you try out simple stuff like this instead of
recommending it untested.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
ISTOO
Word MVP site:
http://www.word.mvps.org







  #7   Report Post  
Jean-Guy Marcil
 
Posts: n/a
Default

Doug Robbins was telling us:
Doug Robbins nous racontait que :

Dim i As Long, j As Long, drange As Range, dtable As Table
Set dtable = Selection.Tables(1)
j = Selection.Information(wdEndOfRangeColumnNumber)
For i = 2 To dtable.Rows.Count
Set drange = dtable.Cell(i, j).Range
drange.End = drange.End - 1
drange.Text = Format(drange.Text, "dddd, MMMM d, yyyy")
Next i


Thanks Doug, I hadn't answered because Jay already had before I even posted
my message.
I guess it will reinforce the message if two versions are available!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
ISTOO
Word MVP site:
http://www.word.mvps.org



  #8   Report Post  
Doug Robbins
 
Posts: n/a
Default

Yes, I didn't see Jay's post until after I had posted my method.

--
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
"Jean-Guy Marcil" wrote in message
...
Doug Robbins was telling us:
Doug Robbins nous racontait que :

Dim i As Long, j As Long, drange As Range, dtable As Table
Set dtable = Selection.Tables(1)
j = Selection.Information(wdEndOfRangeColumnNumber)
For i = 2 To dtable.Rows.Count
Set drange = dtable.Cell(i, j).Range
drange.End = drange.End - 1
drange.Text = Format(drange.Text, "dddd, MMMM d, yyyy")
Next i


Thanks Doug, I hadn't answered because Jay already had before I even
posted my message.
I guess it will reinforce the message if two versions are available!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
ISTOO
Word MVP site:
http://www.word.mvps.org





  #9   Report Post  
Anne Troy
 
Posts: n/a
Default

Hi, Emily. I tested the copy/paste to Excel, format as dates, then
copy/paste back to Word, and it worked like a charm.

*******************
~Anne Troy

www.OfficeArticles.com
"emilydoggy" wrote in message
...
I have a table created in Microsoft Word.

One column of the table contains dates of varying formats:
25-Mar-2005
03/25/05
March 25, 2005.

I would like to batch donvert the column of dates so that they all use the
the same format.

Thanks.



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
Table headers/footers and layout Keith Page Layout 1 April 8th 05 07:37 PM
How to Avoid Word 2003 Table Style Problems Judy Haynes Tables 0 March 23rd 05 06:41 PM
Table AutoFormats vs. Table Styles confusion Tony Jollans Tables 5 March 6th 05 07:18 PM
Import csv data into a specifically formatted Word table Pat Dools Tables 7 February 28th 05 01:03 PM
Excel dates formatted d/m/yy convert to m/d/yy in mail merge GayleT Mailmerge 1 November 29th 04 02:43 AM


All times are GMT +1. The time now is 10:01 AM.

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"