Solved

Visio 2013 COMMENTS PANE commandbar: how to display via VBA?

Posted on 2016-07-21
4
80 Views
Last Modified: 2016-07-26
I need to control the visibility of the visio 2013 COMMENTS PANE.

Application.CommandBars("Commenting").Visible = False or True
      - works fine, IF the pane has already been displayed whilst the file is currently open. Otherwise, Application.CommandBars("Commenting").Visible <--- gives an error.

I want to achieve the vba equivalent of clicking the ribbon/REVIEW/COMMENTS PANE button, then I can control.visibility thereafter.
When I click the ribbon/REVIEW/COMMENTS PANE button, there is no signal in the Developer/Event monitor.

My fall-back position is to use vba On Error to detect the error of attempting to re-set the visibility of Application.CommandBars("Commenting") and then use MsgBox to ask the user to open the Comments Pane.

Thanks
Kelvin
0
Comment
Question by:Kelvin4
  • 2
4 Comments
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 41723533
HI,

Unfortunately, I cannot see a command to open the Comments pane
https://msdn.microsoft.com/en-us/library/office/ff768010.aspx

unlike reviewer
Visio.Application.DoCmd (visCmdTaskPaneReviewer)   '1939

Regards
0
 

Author Closing Comment

by:Kelvin4
ID: 41724203
Hi Rgonzo,
Thanks for your comment; the reference to the Visio DoCmd/DOCMD Commands was especially useful.

I also looked at several other faint cmdBar candidates for a 'Comments pane', and found none.

So have installed my fall back of 'On Error' testing if the Comment Pane has been launched, and if not, using the error handler to direct the user to launch it manually..

Cheers,
Kelvin
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 41729542
With grateful thanks to fellow Visio MVP, John Goldsmith, here is a much more graceful solution to your problem:
     Application.DoCmd(1942)
toggles the Comments pane.

So, Rgonzo's approach was exactly correct -- but this particular command is undocumented.

How did John Goldsmith discover it? He turned on the EventMonitor and watched as he opened and closed the Comments pane.

Should have thought of that myself...
0
 

Author Comment

by:Kelvin4
ID: 41729568
Crickey - I should have seen it too!
Now I can clean up my act and send you my draft 'Article'.

Many thanks to you and John
- Kelvin
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever created a custom Visio stencil – a collection of your own unique master shapes – and then created a drawing by dragging masters onto the drawing page? Have you then made changes to the stencil master and wondered why the shapes on the …
Scott A. Helmers Partner, Harvard Computing Group Microsoft Visio MVP Background Microsoft has added more enhancements and new features to Visio 2010 than to any release since they purchased the Visio product line in 2000. In addition, the com…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question