Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bulk Delete Comments with a Specific Phrase
Hello,
I have 1000 comments in a word document with a specific phrase in it, say "AAA". I want to delete all of those in bulk without deleting the rest of the comments. Is there a way to do this? Thanks. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bulk Delete Comments with a Specific Phrase
If these are comments by a specific reviewer, you can display the markup of
just that reviewer and use Delete All Comments Shown. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA "Refresher" wrote in message ... Hello, I have 1000 comments in a word document with a specific phrase in it, say "AAA". I want to delete all of those in bulk without deleting the rest of the comments. Is there a way to do this? Thanks. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bulk Delete Comments with a Specific Phrase
Thanks for the reply. Unfortunately they are all by the same reviewer.
"Suzanne S. Barnhill" wrote: If these are comments by a specific reviewer, you can display the markup of just that reviewer and use Delete All Comments Shown. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA "Refresher" wrote in message ... Hello, I have 1000 comments in a word document with a specific phrase in it, say "AAA". I want to delete all of those in bulk without deleting the rest of the comments. Is there a way to do this? Thanks. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bulk Delete Comments with a Specific Phrase
As often happens when you want to do something slightly unusual, you need a
macro: Sub DeleteSomeComments() Dim oCm As Comment Dim strPhrase As String strPhrase = InputBox( _ "What phrase signals a comment to delete?", _ "Delete comments containing a phrase") If Len(strPhrase) = 0 Then Exit Sub For Each oCm In ActiveDocument.Comments If InStr(LCase(oCm.Range.Text), LCase(strPhrase)) Then oCm.Delete End If Next End Sub See http://www.gmayor.com/installing_macro.htm if needed. The comparison in this macro is not case-sensitive -- for example, if you enter aaa, then the macro will delete comments containing AAA, AaA, aAa, and so forth. If you want it to be case-sensitive, remove the word LCase from the two places it occurs in the code. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Refresher wrote: Thanks for the reply. Unfortunately they are all by the same reviewer. "Suzanne S. Barnhill" wrote: If these are comments by a specific reviewer, you can display the markup of just that reviewer and use Delete All Comments Shown. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA "Refresher" wrote in message ... Hello, I have 1000 comments in a word document with a specific phrase in it, say "AAA". I want to delete all of those in bulk without deleting the rest of the comments. Is there a way to do this? Thanks. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bulk Delete Comments with a Specific Phrase
Thank you Jay!
"Jay Freedman" wrote: As often happens when you want to do something slightly unusual, you need a macro: Sub DeleteSomeComments() Dim oCm As Comment Dim strPhrase As String strPhrase = InputBox( _ "What phrase signals a comment to delete?", _ "Delete comments containing a phrase") If Len(strPhrase) = 0 Then Exit Sub For Each oCm In ActiveDocument.Comments If InStr(LCase(oCm.Range.Text), LCase(strPhrase)) Then oCm.Delete End If Next End Sub See http://www.gmayor.com/installing_macro.htm if needed. The comparison in this macro is not case-sensitive -- for example, if you enter aaa, then the macro will delete comments containing AAA, AaA, aAa, and so forth. If you want it to be case-sensitive, remove the word LCase from the two places it occurs in the code. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Refresher wrote: Thanks for the reply. Unfortunately they are all by the same reviewer. "Suzanne S. Barnhill" wrote: If these are comments by a specific reviewer, you can display the markup of just that reviewer and use Delete All Comments Shown. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA "Refresher" wrote in message ... Hello, I have 1000 comments in a word document with a specific phrase in it, say "AAA". I want to delete all of those in bulk without deleting the rest of the comments. Is there a way to do this? Thanks. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Comments - Delete All? | Microsoft Word Help | |||
How-to : Insert page breaks after a specific word or phrase ? | Microsoft Word Help | |||
How-to : Insert page breaks after a specific word or phrase ? | Microsoft Word Help | |||
Is it possible to delete all comments at once? | Microsoft Word Help | |||
I would like to delete a specific dictionary language. | Microsoft Word Help |