Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2013, 11:20 PM
jsilva1950 jsilva1950 is offline Macro to highlight text between 2 points in word 2010 Windows 7 64bit Macro to highlight text between 2 points in word 2010 Office 2010 32bit
Novice
Macro to highlight text between 2 points in word 2010
 
Join Date: Apr 2013
Posts: 2
jsilva1950 is on a distinguished road
Default Macro to highlight text between 2 points in word 2010


I am writing a document in word 2010 and need a macro which highlights from starting point 1 to ending point 2 ( the idea is to see the bottom bar for number of words in the highlighted part). I have made markers by typing xxx at point 1 and yyy at point 2. I am quite new to ms word macros. Can someone pl give me the code ? Tks a lot.
Reply With Quote
  #2  
Old 04-24-2013, 11:34 PM
macropod's Avatar
macropod macropod is offline Macro to highlight text between 2 points in word 2010 Windows 7 64bit Macro to highlight text between 2 points in word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,491
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Why do you need a macro? A wildcard Find/Replace can do the same job, where:
Find = xxx(*)yyy
Replace = \1
and the replacement attributes have the desired highlighting set.

Note: the above even deletes the markers as part of the process. If you don't want that, change \1 to ^&.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-25-2013, 12:21 AM
jsilva1950 jsilva1950 is offline Macro to highlight text between 2 points in word 2010 Windows 7 64bit Macro to highlight text between 2 points in word 2010 Office 2010 32bit
Novice
Macro to highlight text between 2 points in word 2010
 
Join Date: Apr 2013
Posts: 2
jsilva1950 is on a distinguished road
Default

Worked, thanks, brillianto ! I will be doing repeatedly, so I will use the ^& option. I need to do a Ctrl Home first, otherwise it does not Find. Also, when I change the Find/Replace options to do some other search I have to enter all the stuff all over again. So I just recorded a macro combining Ctrl Home and Find Replace ! And gave it a shortCut. Will save me hours as my document is miles long - a dissertation, sigh ! THANKS !
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to highlight text between 2 points in word 2010 how to selectively highlight text in word cnyoon2 Word 1 08-04-2015 08:16 AM
Macro to highlight text between 2 points in word 2010 Bullet points with text? jjmclell Word 2 03-01-2013 11:42 AM
Edit Points in Curve: MS Office changes points properties itself, without my action. Sergey SPb PowerPoint 0 08-27-2012 05:33 AM
Trying to highlight pasted text in a macro goldengate Word VBA 0 09-14-2010 09:41 PM
find - reading highlight - highlight all / highlight doesn't stick when saved bobk544 Word 3 04-15-2009 03:31 PM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 08:13 PM.


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