Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Refresher Refresher is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Refresher Refresher is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Refresher Refresher is offline
external usenet poster
 
Posts: 3
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comments - Delete All? proofreader Microsoft Word Help 1 February 26th 07 09:58 PM
How-to : Insert page breaks after a specific word or phrase ? Lene Fredborg Microsoft Word Help 0 November 29th 06 10:49 PM
How-to : Insert page breaks after a specific word or phrase ? AltheaMcWittig Microsoft Word Help 0 November 29th 06 06:54 PM
Is it possible to delete all comments at once? Blaise Microsoft Word Help 2 July 16th 05 12:51 AM
I would like to delete a specific dictionary language. cat Microsoft Word Help 5 January 11th 05 02:21 PM


All times are GMT +1. The time now is 04:26 AM.

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"