View Single Post
 
Old 08-18-2018, 08:53 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,143
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Assuming each reference reflects a paragraph then put the cursor in the paragraph and the following will apply built in character styles top the relative parts of the paragraph.

Code:
Sub FormatReferencePara()
Dim oRng As Range
Dim oStart As Range
    Set oStart = Selection.Range
    Set oRng = Selection.Paragraphs(1).Range
    oRng.Collapse 1
    oRng.MoveEndUntil Chr(44)
    oRng.End = oRng.End + 1
    oRng.Style = "Strong"
    oRng.Collapse 0
    oRng.MoveEndUntil Chr(44)
    oRng.End = oRng.End + 1
    oRng.Style = "Subtle Emphasis"
    oStart.Select
lbl_Exit:
    Set oRng = Nothing
    Set oStart = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote