View Single Post
 
Old 04-12-2018, 02:04 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Kalü View Post
I attached a Word2010 document as example. It works all fine, only after "1. Heading xy" the number 1.1 in the following paragraph becomes highlighted (after pasting in a new document and running the second macro).

You can also see it at the tags, that end after 1.1 and not after Heading xy as they should. Is this maybe because of the automatic numbering?
That's because the bold/italic formatting is applied to the paragraph break in your document and, to faithfully replicate that, the formatting code has to follow the paragraph break - just as it does with any other text. It has no effect on the final result for the following paragraph, though - after running the second macro, the original formatting is restored. In any event, the comments at the end of the post show how to prevent paragraphs breaks being tagged.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote