Quote:
Originally Posted by Marrick13
the macro goes into an infinite loop if the last text in the document has the 'Heading 1' style
|
Easily fixed - simply insert:
If .End = ActiveDocument.Range.End Then Exit Sub
before:
.Collapse Direction:=wdCollapseEnd