View Single Post
 
Old 01-01-2020, 05:02 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
Dim arrParts() As String
  Set oRng = Selection.Range
  With oRng
    arrParts() = Split(.Text, " at the date of")
    .Text = arrParts(0)
    .Font.Bold = True
    .Font.Italic = True
    .Collapse wdCollapseEnd
    .Text = arrParts(1)
    .Font.Bold = False
    .Font.Italic = False
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote