![]() |
#3
|
|||
|
|||
![]()
Thanks Graham. This works great.
It did not appear that this macro was looping thru the entire selection, so I did my best to update it to a For next statement and this seems to work great. I didn't want the comma's to take on the applied format, so I removed the oRng.End part. All seems to work well and I appreciate your time. Code:
Sub FormatReferencePara() Dim oPara As Paragraph Dim oRng As Range Dim oSel As Range Set oSel = Selection.Range For Each oPara In oSel.Paragraphs Set oRng = oPara.Range oRng.Collapse 1 oRng.MoveEndUntil Chr(44) ' oRng.End = oRng.End oRng.Style = "Strong" oRng.Collapse 0 oRng.MoveEndUntil Chr(44) ' oRng.End = oRng.End oRng.Style = "Subtle Emphasis" oSel.Select Next oPara lbl_Exit: Set oRng = Nothing Set oSel = Nothing Exit Sub End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Does a new set of styles in a template overwrite or remove the existing set of styles in a document? | dianahbr | Word | 6 | 03-27-2018 11:12 PM |
Two much blank space between names of styles in the Styles Pane | PereCasanellas | Word | 0 | 10-06-2017 03:47 AM |
Question about spacing between multi-level bullet styles (and other styles) | SDwriter | Word | 0 | 09-26-2017 09:39 AM |
![]() |
Andoheb | Word | 29 | 07-03-2014 01:48 PM |
![]() |
Pedro77 | Word | 3 | 10-15-2011 05:17 AM |