View Single Post
 
Old 12-06-2011, 03:19 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,383
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Matthew,

I hadn't seen your follow-up post until today. You could insert the following code between the existing 'Loop' and 'End With' lines:
Code:
  With .Find
    .Text = "[!/][0-9]{1,2}/[0-9]{2,4}"
    .Execute
  End With
  Do While .Find.Found
    If Split(.Text, "/")(1) = Format(.Text, "yyyy") Then
      .Text = Left(.Text, 1) & Format(DateAdd("yyyy", 1, .Text), "m/yyyy")
    Else
      .Text = Left(.Text, 1) & Format(DateAdd("yyyy", 1, .Text), "m/yy")
    End If
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote