Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find and Delete line of text
I want to find a word/phrase in a line and then delete that line of text. Is
there a way to do that easily? Does it require a macro? Example: Find "BUILTIN", a word somewhere in a line of text in a document. Then delete the line of text that contains the word "BUILTIN". |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find and Delete line of text
You can easily locate a word/phrase by typing "Ctrl" + "F" at the same time
(or clicking on "Edit" - "Find") - type the word(s) in the text box and click "Find Next" (you can also check the "Highlight all items found..." so you can see where all occasions of the word or phrase occur). When you find them, highlight what you need and delete. Hope this helps, MarLou "Stu" wrote: I want to find a word/phrase in a line and then delete that line of text. Is there a way to do that easily? Does it require a macro? Example: Find "BUILTIN", a word somewhere in a line of text in a document. Then delete the line of text that contains the word "BUILTIN". |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find and Delete line of text
Thanks for reponse. Clearly I didn't express what I am looking to do. After
"finding" I want to delete the line with "Delete Line" function or better, "Highlight all items found..." and then delete all lines. Looking for something more automated than doing the selection "by hand". Macro code is ok if Word doesn't have a "Delete Line" function. "MarlaLouise" wrote: You can easily locate a word/phrase by typing "Ctrl" + "F" at the same time (or clicking on "Edit" - "Find") - type the word(s) in the text box and click "Find Next" (you can also check the "Highlight all items found..." so you can see where all occasions of the word or phrase occur). When you find them, highlight what you need and delete. Hope this helps, MarLou "Stu" wrote: I want to find a word/phrase in a line and then delete that line of text. Is there a way to do that easily? Does it require a macro? Example: Find "BUILTIN", a word somewhere in a line of text in a document. Then delete the line of text that contains the word "BUILTIN". |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find and Delete line of text
If you want to delete a line that is repeated (that's what I'm guessing you'd
like to do), you could use the "Find & Replace" and leave the "Replace with..." blank. I've never seen a "Delete line" function, but that would be nice if the lines were numbered and you could type "Delete line # X" - would make things a bit easier. "Stu" wrote: Thanks for reponse. Clearly I didn't express what I am looking to do. After "finding" I want to delete the line with "Delete Line" function or better, "Highlight all items found..." and then delete all lines. Looking for something more automated than doing the selection "by hand". Macro code is ok if Word doesn't have a "Delete Line" function. "MarlaLouise" wrote: You can easily locate a word/phrase by typing "Ctrl" + "F" at the same time (or clicking on "Edit" - "Find") - type the word(s) in the text box and click "Find Next" (you can also check the "Highlight all items found..." so you can see where all occasions of the word or phrase occur). When you find them, highlight what you need and delete. Hope this helps, MarLou "Stu" wrote: I want to find a word/phrase in a line and then delete that line of text. Is there a way to do that easily? Does it require a macro? Example: Find "BUILTIN", a word somewhere in a line of text in a document. Then delete the line of text that contains the word "BUILTIN". |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find and Delete line of text
I would settle for a find/replace if find/replace would blank out a line.
Correct me if I'm wrong, but doesn't Find/Replace simply replace the "Find" part of the line? So then I would just be putting a few blanks in my unwanted line of text. I don't know what text the whole line would contain. "MarlaLouise" wrote: If you want to delete a line that is repeated (that's what I'm guessing you'd like to do), you could use the "Find & Replace" and leave the "Replace with..." blank. I've never seen a "Delete line" function, but that would be nice if the lines were numbered and you could type "Delete line # X" - would make things a bit easier. "Stu" wrote: Thanks for reponse. Clearly I didn't express what I am looking to do. After "finding" I want to delete the line with "Delete Line" function or better, "Highlight all items found..." and then delete all lines. Looking for something more automated than doing the selection "by hand". Macro code is ok if Word doesn't have a "Delete Line" function. "MarlaLouise" wrote: You can easily locate a word/phrase by typing "Ctrl" + "F" at the same time (or clicking on "Edit" - "Find") - type the word(s) in the text box and click "Find Next" (you can also check the "Highlight all items found..." so you can see where all occasions of the word or phrase occur). When you find them, highlight what you need and delete. Hope this helps, MarLou "Stu" wrote: I want to find a word/phrase in a line and then delete that line of text. Is there a way to do that easily? Does it require a macro? Example: Find "BUILTIN", a word somewhere in a line of text in a document. Then delete the line of text that contains the word "BUILTIN". |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find and Delete line of text
Yes, unfortunately you would have to type the entire line in the "Find" box.
It would be easier to "find" a few words you know are there and delete what you need. If you have a large document to deal with, then this could become very time consuming, but I'm not sure of any other way. Maybe someone who is a "macro-wizard" could offer some advice. "Stu" wrote: I would settle for a find/replace if find/replace would blank out a line. Correct me if I'm wrong, but doesn't Find/Replace simply replace the "Find" part of the line? So then I would just be putting a few blanks in my unwanted line of text. I don't know what text the whole line would contain. "MarlaLouise" wrote: If you want to delete a line that is repeated (that's what I'm guessing you'd like to do), you could use the "Find & Replace" and leave the "Replace with..." blank. I've never seen a "Delete line" function, but that would be nice if the lines were numbered and you could type "Delete line # X" - would make things a bit easier. "Stu" wrote: Thanks for reponse. Clearly I didn't express what I am looking to do. After "finding" I want to delete the line with "Delete Line" function or better, "Highlight all items found..." and then delete all lines. Looking for something more automated than doing the selection "by hand". Macro code is ok if Word doesn't have a "Delete Line" function. "MarlaLouise" wrote: You can easily locate a word/phrase by typing "Ctrl" + "F" at the same time (or clicking on "Edit" - "Find") - type the word(s) in the text box and click "Find Next" (you can also check the "Highlight all items found..." so you can see where all occasions of the word or phrase occur). When you find them, highlight what you need and delete. Hope this helps, MarLou "Stu" wrote: I want to find a word/phrase in a line and then delete that line of text. Is there a way to do that easily? Does it require a macro? Example: Find "BUILTIN", a word somewhere in a line of text in a document. Then delete the line of text that contains the word "BUILTIN". |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find and Delete line of text
Thanks for your response. I concur this is probably a macro and have posted
the question in the Word Programming group. "MarlaLouise" wrote: Yes, unfortunately you would have to type the entire line in the "Find" box. It would be easier to "find" a few words you know are there and delete what you need. If you have a large document to deal with, then this could become very time consuming, but I'm not sure of any other way. Maybe someone who is a "macro-wizard" could offer some advice. "Stu" wrote: I would settle for a find/replace if find/replace would blank out a line. Correct me if I'm wrong, but doesn't Find/Replace simply replace the "Find" part of the line? So then I would just be putting a few blanks in my unwanted line of text. I don't know what text the whole line would contain. "MarlaLouise" wrote: If you want to delete a line that is repeated (that's what I'm guessing you'd like to do), you could use the "Find & Replace" and leave the "Replace with..." blank. I've never seen a "Delete line" function, but that would be nice if the lines were numbered and you could type "Delete line # X" - would make things a bit easier. "Stu" wrote: Thanks for reponse. Clearly I didn't express what I am looking to do. After "finding" I want to delete the line with "Delete Line" function or better, "Highlight all items found..." and then delete all lines. Looking for something more automated than doing the selection "by hand". Macro code is ok if Word doesn't have a "Delete Line" function. "MarlaLouise" wrote: You can easily locate a word/phrase by typing "Ctrl" + "F" at the same time (or clicking on "Edit" - "Find") - type the word(s) in the text box and click "Find Next" (you can also check the "Highlight all items found..." so you can see where all occasions of the word or phrase occur). When you find them, highlight what you need and delete. Hope this helps, MarLou "Stu" wrote: I want to find a word/phrase in a line and then delete that line of text. Is there a way to do that easily? Does it require a macro? Example: Find "BUILTIN", a word somewhere in a line of text in a document. Then delete the line of text that contains the word "BUILTIN". |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete sewctions of text using find and replace | Microsoft Word Help | |||
Macro to find text, then delete entire line containing the text? | Microsoft Word Help | |||
how to delete a complete line in a text | Microsoft Word Help | |||
Find and Replace: delete a line & find a number 10 | Microsoft Word Help | |||
How to delete text line below table in header | Page Layout |