Author Topic: Visio 2016 new drawing from Addin missing ribbon  (Read 182 times)

0 Members and 1 Guest are viewing this topic.

marie99

  • Newbie
  • *
  • Posts: 2
Visio 2016 new drawing from Addin missing ribbon
« on: June 14, 2018, 12:15:38 AM »
This is a weird one and I am stumped.  I have developed a few custom apps in C# that allow the user to click a backstage button, and the handler creates a new blank drawing.  A few weeks ago, a client using Visio 2016 noticed that the drawing opened with blank white space where the ribbon should be.  Hitting Alt-F to return to the backstage, then the arrow to return to the drawing makes the ribbon appear.  His users using Visio 2013 aren't seeing this.

I wrote a small addin that only has the one backstage button that opens a blank drawing:
VisioApplication.Documents.Add(string.Empty);
And this shows this problem.  I've used both VS 2010 and VS 2017, and see the problem in both.  I've also tried AddEx with no change.

Any idea on how to get Visio to fix this, or how I can work around it in code?  Is there code to go to the backstage, then return to the drawing so that I can simulate what the users now have to do?

Thanks for any help!

Nikolay

  • Hero Member
  • *****
  • Posts: 762
    • UnmanagedVisio
Re: Visio 2016 new drawing from Addin missing ribbon
« Reply #1 on: June 14, 2018, 02:43:57 AM »
1. Can you share the code?
2. Have you tried to refresh the ribbon (ribbonUI.Invalidate)
3. Have you tried to move you action to Idle/NoEvenst pending?

marie99

  • Newbie
  • *
  • Posts: 2
Re: Visio 2016 new drawing from Addin missing ribbon
« Reply #2 on: June 14, 2018, 01:07:17 PM »
I'd already tried ribbon.Invalidate with no effect, but moving the Documents.Add call on to the Idle handler did the trick.  Thanks for the tip!