Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

Searching for comments

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Doue - 05 Jan 2005 09:54 GMT
In Word97, searching for comments used ^a. This does not seem to work
for latest versions of Word. Any ideas?

Thanks
Signature

John Doue

Word Heretic - 05 Jan 2005 10:05 GMT
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


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.