Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2018, 02:04 PM
macropod's Avatar
macropod macropod is offline VBA Find&Replace all bold, itlaic, underlined and highlighted words/characters Windows 7 64bit VBA Find&Replace all bold, itlaic, underlined and highlighted words/characters Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Find&Replace all bold, itlaic, underlined and highlighted words/characters Macro to find and replace headings in bold and underline redzan Word VBA 4 02-13-2016 12:24 PM
VBA Find&Replace all bold, itlaic, underlined and highlighted words/characters Find, select, and replace part of text with bold paik1002 Word VBA 4 12-07-2015 11:24 PM
VBA Find&Replace all bold, itlaic, underlined and highlighted words/characters Find and Replace some characters with Bullets kjxavier Word 1 01-02-2015 12:15 AM
VBA Find&Replace all bold, itlaic, underlined and highlighted words/characters Find/Replace Wildcard Needed-Bold & Highlight rsrasc Word VBA 3 11-11-2014 03:55 PM
VBA Find&Replace all bold, itlaic, underlined and highlighted words/characters find and replace in bold redzan Word VBA 1 07-27-2014 03:35 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft