View Single Post
 
Old 11-30-2021, 04:44 AM
NewVBAUser NewVBAUser is offline Mac OS X Office 2016 for Mac
Novice
 
Join Date: Nov 2021
Posts: 3
NewVBAUser is on a distinguished road
Default

Thanks for your reply. Unfortunately, that does not work for me on a Mac. I looked out the Outline view and tried to do what you suggested manually and it won't promote a Heading 1 style to a Title style either.

From playing around with things while recording a macro it looks like the following will do what you suggested manually using keyboard shortcuts

Selection.WholeStory
Selection.Paragraphs.OutlinePromote

However I need to somehow automatically select the text of whatever is in style Heading 1 and change that to Title - > Selection.Style = ActiveDocument.Styles("Title")

If anyone knows how I can auto select the Heading 1 text I would be very grateful. The text will be dynamic so I can't look for a set string :-(

Last edited by NewVBAUser; 11-30-2021 at 04:54 AM. Reason: more detail added
Reply With Quote