applying heading style within paragraph using macro
Hi all,
I have a macro that moves a freestanding heading to an in-line heading. At the end of the macro, I would like to apply a heading style--for the sake of example, let's say Heading 4.
Example of finished text would be:
Some example heading. Paragraph text begins on same line...
I would like the macro to apply the Heading 4 style to the text "Some example heading" (not including the period). However, when I record this action with the macro recorder and then later try to run the macro, it seems that Word is unable to apply a heading style to a selected portion of text within a line. Is there a way to force this in the VBA code to work around Word's limitation with the macro recorder?
|