![]() |
|
#1
|
|||
|
|||
![]()
HI I am not expert at macros.
My problem is that I have indexes with thousands of entries. Each is prefixed with a date of the form "month(space)day(space)year" with the months as abbreviations ( jan, feb, mar, apr, may, jun, jul, aug sept, oct, nov, dec); the day as numeric (eg 1, 10, 30), and the year in full (eg 1870, 1881, 1900). I want to highlight ( ie Bold ) all these dates automatically throughout out the existing text without changing the font in any other way. I do not mind if a date entry of the same format but elsewhere in the text gets highlighted in the process. How can this be done using for example a macro? or am I pipe dreaming? Thanks, L-j |
#2
|
||||
|
||||
![]()
You can do without the need for a macro, using a wildcard Find/Replace.
You appear to be working with you're working with US-format dates, so try: Find = <[JFMASOND][anuryebchpilgstmov]{2,8} [0-9]{1,2} [12][0-9]{3}> Replace = ^& and setting the replacement font format to bold. For UK-format dates (d mmm yyyy), the Find/Replace expression would be: Find = <[0-9]{1,2} [JFMASOND][anuryebchpilgstmov]{2,8} [12][0-9]{3}> Replace = ^& and setting the replacement font format to bold.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Thanks Paul, for all your help!
L-j |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
pmokover | Word | 16 | 10-30-2024 02:50 AM |
![]() |
AllusiveKitten | Word | 2 | 07-20-2015 04:00 PM |
Macro to keep formatted form fields after mail merge or replace text with formatted form fields | jer85 | Word VBA | 2 | 04-05-2015 10:00 PM |
Highlighting Text After Sync | lvautier | OneNote | 1 | 02-07-2015 04:02 PM |
![]() |
Cosmo | Word VBA | 3 | 06-24-2014 05:59 AM |