In Word97, searching for comments used ^a. This does not seem to work
for latest versions of Word. Any ideas?
Thanks
G'day John Doue <notwobe@yahoo.com>,
ActiveDocument.Comments(1)
Steve Hudson - Word Heretic
steve from wordheretic.com (Email replies require payment)
Without prejudice
John Doue reckoned:
>In Word97, searching for comments used ^a. This does not seem to work
>for latest versions of Word. Any ideas?
>
>Thanks
John Doue - 05 Jan 2005 10:45 GMT
> G'day John Doue <notwobe@yahoo.com>,
>
[quoted text clipped - 11 lines]
>>
>>Thanks
Thanks for the prompt answer. However, my previous macro used the
following routine:
With Selection.Find
.Text = "^a"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
How do I need to modify it? Sorry, but as you can tell, my expertise is
really limited.
Thanks

Signature
John Doue
John Doue - 05 Jan 2005 13:02 GMT
> G'day John Doue <notwobe@yahoo.com>,
>
[quoted text clipped - 11 lines]
>>
>>Thanks
Thanks for the prompt answer. However, my previous macro used the
following routine:
With Selection.Find
.Text = "^a"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
How do I need to modify it? Sorry, but as you can tell, my expertise is
really limited.
Forgot to mention: of course, I could use WordBasic.DeleteAllCommentsInDoc
but I wish to keep count of comments deleted.
Thanks

Signature
John Doue
Peter - 05 Jan 2005 18:06 GMT
> > G'day John Doue <notwobe@yahoo.com>,
> >
[quoted text clipped - 36 lines]
>
> Thanks
Try the following::
Dim i As Integer
Dim cmt As Comment
With ActiveDocument
i = .Comments.Count
For Each cmt In .Comments
cmt.Delete
Next
End With
Call MsgBox("Deleted " & i & " comments")
Set cmt = Nothing
hth,
-Peter
John Doue - 05 Jan 2005 20:38 GMT
>>>G'day John Doue <notwobe@yahoo.com>,
>>>
[quoted text clipped - 57 lines]
>
> -Peter
Thanks Peter, I am very grateful. Works as expected.

Signature
John Doue
Word Heretic - 05 Jan 2005 23:43 GMT
G'day John Doue <notwobe@yahoo.com>,
Count=ActiveDocument.Comments.Count
WordBasic.DeleteAllCommentsInDoc
is much faster
Steve Hudson - Word Heretic
steve from wordheretic.com (Email replies require payment)
Without prejudice
John Doue reckoned:
>>>>G'day John Doue <notwobe@yahoo.com>,
>>>>
[quoted text clipped - 58 lines]
>> -Peter
>Thanks Peter, I am very grateful. Works as expected.
John Doue - 06 Jan 2005 09:34 GMT
> G'day John Doue <notwobe@yahoo.com>,
>
[quoted text clipped - 73 lines]
>>
>>Thanks Peter, I am very grateful. Works as expected.
Thanks Steve ... difficult to make this macro shorter!
Regards

Signature
John Doue