View Single Post
 
Old 11-30-2021, 02:16 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
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

Before the outline promote is run you will need to handle the Heading 1 to change its style to Title. This should be done with a Find and Replace. If you are using a macro, this would do it
Code:
Sub Macro2()
  With ActiveDocument.Range.Find
    .ClearFormatting
    .Style = ActiveDocument.Styles("Heading 1")
    .Replacement.ClearFormatting
    .Replacement.Style = ActiveDocument.Styles("Title")
    .Text = ""
    .Wrap = wdFindContinue
    .Format = True
    .Execute Replace:=wdReplaceAll
  End With
  ActiveDocument.Range.Paragraphs.OutlinePromote
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote