View Single Post
 
Old 11-22-2025, 03:02 AM
RobiNew RobiNew is offline Windows 11 Office 2016
Competent Performer
 
Join Date: Sep 2023
Posts: 231
RobiNew is on a distinguished road
Default

Thank you for your time, Macropod!
In the following macro the line "oPar.Range.Characters.Last.Previous = vbNullString" returns this error "object doesn't support this property or method". Can you help?
Code:
Sub RemovePeriod()
  Set oRng = ActiveDocument.Range
For Each oPar In oRng.Paragraphs
  If oPar.Range.Style = "LeftTitle" Then
  'MsgBox "Found"
  If oPar.Range.Characters.Last.Previous = "." Then
  'MsgBox oPar.Range.Characters.Last.Previous
  oPar.Range.Characters.Last.Previous = vbNullString
  End If
  End If
Next oPar
End Sub
Reply With Quote