View Single Post
 
Old 07-05-2022, 03:43 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

Does this easier, non-specific version go close enough? It appears to work quite well on your sample doc. I think for it to work best, your selection should begin with a Heading 1 so the autoformat can work out the correct hierarchy.
Code:
Sub Reformatter()
  With Options
    .AutoFormatApplyHeadings = True
    .AutoFormatApplyLists = True
    .AutoFormatApplyBulletedLists = True
    .AutoFormatApplyOtherParas = True
    .AutoFormatReplaceQuotes = True
    .AutoFormatReplaceSymbols = True
    .AutoFormatReplaceOrdinals = True
    .AutoFormatReplaceFractions = True
    .AutoFormatReplacePlainTextEmphasis = True
    .AutoFormatReplaceHyperlinks = True
    .AutoFormatPreserveStyles = True
    .AutoFormatPlainTextWordMail = True
  End With
  Selection.Document.Kind = wdDocumentNotSpecified
  Selection.Range.AutoFormat
  WordBasic.ToolsBulletsNumbers Replace:=0, Type:=1, Remove:=1
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote