Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Tailings Tailings is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Tailings Tailings is offline
external usenet poster
 
Posts: 2
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
double window envelope tpdebronsky Page Layout 5 May 18th 23 08:51 PM
Header with picture or text box Scott Page Layout 15 April 28th 23 02:52 AM
Arcane Question @ Text Boxes & "Frames" Elmer Page Layout 12 August 14th 06 08:34 AM
How can I create a macro to find and replace text attributes? pubgal23 Microsoft Word Help 3 September 8th 05 06:09 AM
Outline Renee Hendershott Page Layout 2 December 25th 04 03:49 PM


All times are GMT +1. The time now is 08:03 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"