View Single Post
 
Old 01-05-2014, 01:29 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,512
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 VeeCee View Post
Unfortunately my document has a mixture of valid entries witout a date and trying your suggestion ALL lines starting without a date get deleted. That is why i wanted to know whether there is a macro or some short cut to delete ALL entries between TWO words or characters.
Well, yes, but one needs to know beforehand what those words/characters are. In any event, a VBA solution would basically be a coded version of the wildcard Find/Replace expressions I've already been providing.

The wildcard Find/Replace expression could be made more specific. For example:
Find = [^13^l]*([^13^l][0-9]{1,2}-)
Replace = \1
will only act on those cases where a one/two digit number is followed by a hyphen (as you have with your dates). We could even add further sophistication to include the rest of the date in a wildcard form if necessary.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote