Navigating comments

A

Alex

Hello.

How to I programmatically jump to the next or previous comment (according to the current caret position)?

Thank you.


Best wishes,
Alex.
 
D

Doug Robbins

Dim myrange As Range
Set myrange = ActiveDocument.Range
myrange.Start = Selection.Range.Start
myrange.Comments(1).Range.Select


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
Hello.

How to I programmatically jump to the next or previous comment (according to
the current caret position)?

Thank you.


Best wishes,
Alex.
 
J

Jay Freedman

Alex said:
Hello.

How to I programmatically jump to the next or previous comment
(according to the current caret position)?

Thank you.


Best wishes,
Alex.

The statement

Selection.GoToNext What:=wdGoToComment

moves the cursor to the beginning of the next comment (if any).
 
A

Alex

Thank you Jay,

Jay Freedman said:
The statement

Selection.GoToNext What:=wdGoToComment

moves the cursor to the beginning of the next comment (if any).

Exactly what I needed!


Best wishes,
Alex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top