Link to home
Start Free TrialLog in
Avatar of Bryce Bassett
Bryce BassettFlag for United States of America

asked on

VBA: Why does adding a comment programmatically in Word open the Comments pane?

I'm using VBA code in Word 2010/2016 to add a comment to the selection range in Word.  Works fine, but it opens the Comments pane at the bottom of the screen and positions my insertion point down in that pane, which I don't want.  I just want my insertion point to be inside the newly added comment bubble on the right margin, the same as when I manually add a comment.

I tried newcomment.range.select or newcomment.edit, but both still put me down in the bottom pane.  

So I need to understand how to prevent the Comment pane from showing altogether, or a way to close it once it does.

Appreciate any help.
Avatar of Rgonzo1971
Rgonzo1971

Hi,

in Wd 2016 pls try
    Dim wrdRevisionsFilter As RevisionsFilter
    Set wrdRevisionsFilter = ActiveDocument.ActiveWindow.View.RevisionsFilter
    wrdRevisionsFilter.Markup = wdRevisionsMarkupSimple

Open in new window

before commenting

Not tested

Regards
ASKER CERTIFIED SOLUTION
Avatar of Bryce Bassett
Bryce Bassett
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bryce Bassett

ASKER

Suggested answer did not solve the issue.  Found the answer myself via Google search.