View Single Post
 
Old 08-03-2021, 10:56 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,163
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Firstly, to remove the autonumbers, this code is simpler
Code:
Sub NumberingDeleteHardcoded()
  'Only acts on selected paragraphs
  Dim iResp As Integer
  iResp = MsgBox("This macro will remove all hardcoded paragraph numbers " _
    & vbCr & "from the SELECTED paragraphs. Click OK to continue.", _
    vbOKCancel, "Delete Hard Numbers")
  If iResp = vbOK Then
    WordBasic.ToolsBulletsNumbers Replace:=0, Type:=1, Remove:=1
  End If
End Sub
Secondly, if the right paragraph style is applied and those styles are defined correctly, to get the alignment correct all you need to do is reset the paragraph attributes to remove local overrides.
Code:
Selection.ParagraphFormat.Reset
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote