Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2018, 02:28 PM
FearlessStamper FearlessStamper is offline Word 2010 -- Removing page cites within a document Windows 7 64bit Word 2010 -- Removing page cites within a document Office 2010 64bit
Novice
Word 2010 -- Removing page cites within a document
 
Join Date: Sep 2016
Location: Indianapolis, Indiana
Posts: 8
FearlessStamper is on a distinguished road
Post Word 2010 -- Removing page cites within a document

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
Reply With Quote
  #2  
Old 02-20-2018, 05:25 PM
Charles Kenyon Charles Kenyon is offline Word 2010 -- Removing page cites within a document Windows 10 Word 2010 -- Removing page cites within a document Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

If you could mark the text with a character style it would be easy to find.
Reply With Quote
  #3  
Old 02-20-2018, 10:09 PM
macropod's Avatar
macropod macropod is offline Word 2010 -- Removing page cites within a document Windows 7 64bit Word 2010 -- Removing page cites within a document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

You could use a wildcard Find/Replace, where:
Find = ^32\(p[!\)]@\)
Replace = nothing
No macros required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 02-21-2018, 05:58 AM
Charles Kenyon Charles Kenyon is offline Word 2010 -- Removing page cites within a document Windows 10 Word 2010 -- Removing page cites within a document Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by macropod View Post
You could use a wildcard Find/Replace, where:
Find = ^32\(p[!\)]@\)
Replace = nothing
No macros required.
Paul, your understanding of wildcards far exceeds mine. However, the above replaces (p. 2) and (paragraph 24) but not (pp. 3-7). Is a period needed?

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).
Reply With Quote
  #5  
Old 02-21-2018, 03:53 PM
macropod's Avatar
macropod macropod is offline Word 2010 -- Removing page cites within a document Windows 7 64bit Word 2010 -- Removing page cites within a document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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 Charles Kenyon View Post
Quote:
Originally Posted by macropod View Post
You could use a wildcard Find/Replace, where:
Find = ^32\(p[!\)]@\)
Replace = nothing
No macros required.
Paul, your understanding of wildcards far exceeds mine. However, the above replaces (p. 2) and (paragraph 24) but not (pp. 3-7).
Au contraire, it replaces all of those.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 02-21-2018, 05:29 PM
Charles Kenyon Charles Kenyon is offline Word 2010 -- Removing page cites within a document Windows 10 Word 2010 -- Removing page cites within a document Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by macropod View Post
Au contraire, it replaces all of those.
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.
Reply With Quote
  #7  
Old 02-21-2018, 05:33 PM
macropod's Avatar
macropod macropod is offline Word 2010 -- Removing page cites within a document Windows 7 64bit Word 2010 -- Removing page cites within a document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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 Charles Kenyon View Post
However, she did not want it to replace (paragraph 24).
I don't see any indication of that in post #1, or even that such references exist.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
macro

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2010 -- Removing page cites within a document MS Word 2010 Table Selector Selects Header On One Page and Rows On Next Page scptech Word Tables 4 01-11-2016 02:55 PM
Word 2010 -- Removing page cites within a document Removing space before blank page / page break greasel Word 5 10-17-2014 07:04 PM
Word 2010 -- Removing page cites within a document Unable to retain section page numbering while removing the blank pages in MS word 201 ramsgarla Word 3 10-01-2012 03:52 AM
Word 2010 -- Removing page cites within a document Insert multi page pdf into Word 2010 document TimTDP Word 1 04-18-2012 04:22 AM
Word 2010 -- Removing page cites within a document Running alphabets at left margins and pinpoint cites at right margin ghumdinger Word 3 05-05-2011 02:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:23 PM.


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