View Single Post
 
Old 03-20-2021, 03:07 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

You could edit the code in post #2, changing:
Code:
        .Text = "Revision No."
to:
Code:
        .MatchWildcards = True
        .Text = "[PR][eu][bv][ils]{3}[ehno]{2}[ Ndo]{1,3}"
and changing:
Code:
        If .Information(wdWithInTable) = True Then .Cells(1).Next.Range.Text = "6"
to something like:
Code:
        If .Information(wdWithInTable) = True Then
          Select Case .Text
            Case "Revision No."
              .Cells(1).Next.Range.Text = "6"
            Case "Published "
              If .Cells(1).ColumnIndex = 1 Then
                .Cells(1).Next.Range.Text = Format(Now, "DDD, D MMM YYYY")
              End If
          End Select
        End If
Since you don't say how the new date is to be determined, I've used 'Format(Now, "DDD, D MMM YYYY")' to insert today's date.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote