Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-07-21
4
Medium Priority
?
102 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 53

Accepted Solution

by:
Rgonzo1971 earned 2000 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 31

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

The Question Several times in recent years, someone has posted a question at EE asking whether they could display the Windows directory structure – folders and subfolders – using Visio. When one person specifically asked about displaying directory …
The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine containers. We’ll explore lists (http://www.experts-exchange.com/Microsoft/Applications/M…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

886 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