PDA

View Full Version : Delete line containing phrase?



Horace
05-23-2008, 12:31 PM
Can anyone help with a snippet of code to find a phrase, e.g. " red car", throughout a document, and delete the entire line that contains the phrase?

Thanks,

H

mdmackillop
05-23-2008, 01:48 PM
Hi Horace,
Welcome to VBAX
Without trying to be difficult, "Line" has various concepts in Word, what EXACTLY do you mean?

fumei
05-23-2008, 02:52 PM
Also, try recording a macro and then looking at the code. Although recorded macros always quite a bit of extraneous code, it will give you a start.