View Single Post
 
Old 07-11-2023, 05:25 PM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

There was nothing in your original code that hid content:

Code:
Sub Macro1()
Dim oRng As Range
Dim oPara As Range, oNewPara As Range
Dim i As Long
Set oRng = ActiveDocument.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
  oPara.Font.Hidden = True
Next i
lbl_Exit:
Set oRng = Nothing
Set oPara = Nothing
Set oNewPara = Nothing
Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote