![]() |
|
#1
|
||||
|
||||
![]()
Without the document to test, the following should work
Code:
Sub Macro1() Dim oRng As Range Dim oPara As Range, oNewPara As Range Dim i As Long Set oRng = Selection.Range If oRng.End = ActiveDocument.Range.End Then oRng.InsertParagraphAfter End If For i = oRng.Paragraphs.Count To 1 Step -1 Set oPara = oRng.Paragraphs(i).Range Set oNewPara = oPara.Duplicate oNewPara.Collapse 0 oNewPara.FormattedText = oPara.FormattedText oNewPara.Font.Italic = True Next i lbl_Exit: Set oRng = Nothing Set oPara = Nothing Set oNewPara = 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 |
#2
|
|||
|
|||
![]() Quote:
Thank you, gmayor! It works perfectly - much obliged ![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jalve | Word VBA | 21 | 05-26-2021 07:38 PM |
![]() |
Dave T | Word VBA | 7 | 07-31-2019 08:12 PM |
![]() |
moorea21 | Word | 4 | 11-01-2018 12:53 PM |
![]() |
iamgator | Word VBA | 5 | 12-27-2016 01:34 AM |
![]() |
AustinBrister | Word VBA | 3 | 06-01-2015 07:00 AM |