![]() |
#1
|
|||
|
|||
![]()
An attorney I work for will often dictate a memo on medical records, citing the page numbers within the paragraphs, i.e., (p. 27) (pp. 27-29) (p. 27, 29)
Often, she later copies that text into a letter to our client, but she needs to remove the page cites. I am moderately macro-intelligent, however, i am not sure how to create a macro that could search for the different variations of page cites. Is there a way to create a macro that could search for all variations of page cites and remove them? For instance, my fear is if i create a macro that searches for "(p" it might pick up a part of a word/sentence that is supposed to be set out in parenthesis. any help would be greatly appreciated!!! Andrea |
#2
|
|||
|
|||
![]()
If you could mark the text with a character style it would be easy to find.
|
#3
|
||||
|
||||
![]()
You could use a wildcard Find/Replace, where:
Find = ^32\(p[!\)]@\) Replace = nothing No macros required.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]() Quote:
Find = ^32\(p.[!\)]@\) Replace = nothing followed by Find = ^32\(pp.[!\)]@\) Replace = nothing Andrea: For more on wildcards. Here is a white paper on the subject. The searches are looking for a space before the first open parenthesis. If your attorney is at all like me and there are any where there is not a space first, they will not be replaced. To take care of that, you could take the ^32 out of the search strings in a cleanup. Also, remember that wildcard searches are case-sensitive so these will not find (P. 23). |
#5
|
||||
|
||||
![]() Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
![]()
Just tried again and it replaced all three. I must have not had a space in front of the one that didn't last time.
However, she did not want it to replace (paragraph 24). I'm sure you can put together a construction that will do either p. or pp. in one pass; I may try later tonight. |
#7
|
||||
|
||||
![]()
I don't see any indication of that in post #1, or even that such references exist.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
macro |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
scptech | Word Tables | 4 | 01-11-2016 02:55 PM |
![]() |
greasel | Word | 5 | 10-17-2014 07:04 PM |
![]() |
ramsgarla | Word | 3 | 10-01-2012 03:52 AM |
![]() |
TimTDP | Word | 1 | 04-18-2012 04:22 AM |
![]() |
ghumdinger | Word | 3 | 05-05-2011 02:01 AM |