Hello -
I am trying find date occurrences in a Word document from Excel. The format of the date is 'ddmmmyy'.
(Example: 17SEP18). I want to be able to replace with the current date.
This is what I have so far (probably much simpler than this)
That's all I have so far. Have tried different things with no luck.
Thanks!
I am trying find date occurrences in a Word document from Excel. The format of the date is 'ddmmmyy'.
(Example: 17SEP18). I want to be able to replace with the current date.
This is what I have so far (probably much simpler than this)
Code:
Dim regexp As New RegExp
Dim prevdate As String
Dim pattern As String
pattern = "(^[0-9]{2})([A-Z]{3})([0-9]{2})"
With ActiveDocument.Content
With regexp
.Global = True
.IgnoreCase = False
.pattern = pattern
.Replace
That's all I have so far. Have tried different things with no luck.
Thanks!