View Single Post
 
Old 09-21-2014, 07:02 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit 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

I could have simplified the Find expression, but I wanted to minimise the risk of false matches. For example:
Find = ([0-9]*Expense [! ]@ )([! ]@ )([! ]{1,})[!^13]@^13(*)^13(*)^13(*)^13*^13

The OP could even record either of these as a macro and end up with code that processes either the first instance stating from the insertion point or an entire document. As coded, your macro:
• does no validation that what is selected contains the right kind of data;
• requires the entire range to be selected (will fail if less than the required range is selected); and
• will only work with the first instance and is liable to blat anything extra that gets selected but shouldn't be processed,
(just me being picky)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote