Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Macro to find text, then delete entire line containing the text?
I have text that I am formatting using macros,mostly with find & replace.
Within the text are lines containing specific text that I need to delete. I have a macro to find one instance of the text and delete the entire line, but I can't figure out how to make it delete ALL lines with the specified text. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Macro to find text, then delete entire line containing the text?
What constitutes a 'line' in this context. Is it a line that ends in a
paragraph mark - ¶ Is the text at the start of the line? See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tailings wrote: I have text that I am formatting using macros,mostly with find & replace. Within the text are lines containing specific text that I need to delete. I have a macro to find one instance of the text and delete the entire line, but I can't figure out how to make it delete ALL lines with the specified text. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Macro to find text, then delete entire line containing the tex
Yes. Every line of text has a paragraph mark at the end. I have found out how
to select the entire line, and delete it. What I am having trouble with is having the macro continue and find every instance of the specified text throughout the document. Right now my macro just runs once and stops. I'm not sure yet how to make it loop until it has found all instances of the specified text. Thanks in advance for the assistance! And I already learned a great deal from your wildcards info. "Graham Mayor" wrote: What constitutes a 'line' in this context. Is it a line that ends in a paragraph mark - ¶ Is the text at the start of the line? See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tailings wrote: I have text that I am formatting using macros,mostly with find & replace. Within the text are lines containing specific text that I need to delete. I have a macro to find one instance of the text and delete the entire line, but I can't figure out how to make it delete ALL lines with the specified text. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
double window envelope | Page Layout | |||
Header with picture or text box | Page Layout | |||
Arcane Question @ Text Boxes & "Frames" | Page Layout | |||
How can I create a macro to find and replace text attributes? | Microsoft Word Help | |||
Outline | Page Layout |