none
Ribbon disappears when opening a new Workbook RRS feed

  • Question

  • Hello and good morning or afternoon!

    I have developed a document-based Excel VSTO solution (.net 4.0 - Excel 2010 / 2007). it has been working fine, until client asked me to produce reports on a separate Workbook/Sheets. The application creates new workbook and it produces all Worksheets in newly created book -so far no problem, it works great. When process is completed and user reviews NEW workbook (which contains the information required) and goes back into the VSTO Solution the ribbon is gone.

    In the meantime -as a workaround, I have asked the users to close both workbooks; the newly created (which they have to save) and the Excel VSTO Solution and finally re-open application (which is a pain).

    Any ideas?


    Gustavo Miller

    Tuesday, November 25, 2014 12:39 PM

All replies

  • Hello Gustavo,

    Do you get any UI errors in Excel?

    See How to: Show Add-in User Interface Errors for more information.

    Do you use the getVisible callback?

    Tuesday, November 25, 2014 2:36 PM
  • This is a document based AddIn is not VBA. The getVisible Callback is for VBA application.

    I was testing today. When I open the excel solution (xxxx.xlsx); the ribbon is displayed as normal. Without selecting any option I create a new workbook (blank workbook) and when I return to my addin the Ribbon is gone. So it is consistent; when I check on the Ribbon object in the Workbook_SheetActivate event using the Globals.Ribbons.MyAddInApp.MyTabName.Visible it reports as visible but is not.

    This tells me that the object is there but is not showing.

    Thank you though for the input!


    Gustavo Miller

    Thursday, November 27, 2014 2:31 PM
  • This is a document based AddIn is not VBA. The getVisible Callback is for VBA application.

    I was testing today. When I open the excel solution (xxxx.xlsx); the ribbon is displayed as normal. Without selecting any option I create a new workbook (blank workbook) and when I return to my addin the Ribbon is gone. So it is consistent; when I check on the Ribbon object in the Workbook_SheetActivate event using the Globals.Ribbons.MyAddInApp.MyTabName.Visible it reports as visible but is not.

    This tells me that the object is there but is not showing.

    Thank you though for the input!


    Gustavo Miller

    It does it ONLY for Office 2007, when running in Office 2010 the Ribbon bar remains when creating a new workbook.

    Gustavo Miller

    Thursday, November 27, 2014 2:41 PM
  • > The getVisible Callback is for VBA application.

    You are on the wrong avenue. You can read more about the Ribbon UI in the following series of articles in MSDN:

    Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)

    Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)

    Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)

    Thursday, November 27, 2014 6:11 PM
  • Do you have the latest updates and service packs for Office 2007 installed?
    Thursday, November 27, 2014 6:12 PM
  • Hello Eugene,

    I am not using Custom UI Editor to create a XML ribbon that goes into the xxxxx.xlxs (zip) file. I have created a VSTO AddIN using Visual Studio 2010; using an Excel 2010 Workbook. The Customizing the 2007 series was release quite sometime ago, I am familiar with that. After application is compiled it produces a whole bunch of DLL's including a VSTO file that is used to register the AddIN.

    Nevertheless I have looked into the documents you send and I thank you for your gain of salt!

    Gus


    Gustavo Miller

    Monday, December 1, 2014 12:14 PM
  • Hello Gustavo,

    Do you get any UI errors in Excel?

    See How to: Show Add-in User Interface Errors for more information.

    Do you use the getVisible callback?


    I will try this one today Eugene! Thanks again!

    Gustavo Miller

    Monday, December 1, 2014 12:16 PM
  • Hello Gustavo,

    Do you get any UI errors in Excel?

    See How to: Show Add-in User Interface Errors for more information.

    Do you use the getVisible callback?


    I will try this one today Eugene! Thanks again!

    Gustavo Miller

    Nope. No errors are displayed. As soon as I open up the application, I go to Office button--> New --> Blank Workbook. It creates new book and when I go back to the application Ribbon is gone. I will create a new Excel Application with no functionality; just the ribbon and see what happens.

    I only have a few hours to allocate to this; my client does not want to spend much time on it; the workaround works fine for them. It is just bothering me.


    Gustavo Miller

    Monday, December 1, 2014 12:25 PM
  • Hello Eugene,

    I am not using Custom UI Editor to create a XML ribbon that goes into the xxxxx.xlxs (zip) file. I have created a VSTO AddIN using Visual Studio 2010; using an Excel 2010 Workbook. The Customizing the 2007 series was release quite sometime ago, I am familiar with that. After application is compiled it produces a whole bunch of DLL's including a VSTO file that is used to register the AddIN.

    Nevertheless I have looked into the documents you send and I thank you for your gain of salt!

    Gus


    Gustavo Miller


    Well it looks that I was wrong Eugene, you can use XML in VSTO as well; this I believe will embed the Ribbon into the XLSX rather than into a DLL, then you can use callbacks. Implementing this would mean that I would have to change how the application is working now. I will investigate more into using this method; perhaps I could try on next release.

    Gustavo Miller

    Monday, December 1, 2014 12:34 PM
  • Hi Gustavo,

    >> I will create a new Excel Application with no functionality; just the ribbon and see what happens.

    What’s the result of this?

    >> the workaround works fine for them. It is just bothering me.

    Which workaround? Please provide the detail information.

    >> After application is compiled it produces a whole bunch of DLL's including a VSTO file that is used to register the AddIN.

    You may provide the detail steps so that we could try it to check whether could reproduce that issue.

    Best Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 2, 2014 9:57 AM
    Moderator
  • Sorry I was out of the country so I was not working on this issue;

    Starain;

    1) I created new project with no functionality; just the ribbon. When open a new workbook then Excel show the ribbons for that NEW workbook, when I switch back to the newly created project workbook ribbon is gone. I should mentioned that this is a Document-based solution.

    2) Workaround: user closes Excel (completely) and it opens the Workbook application and ribbon is there. That is the workaround they have now.

    3) I am not sure I follow you on this; I just compile. The Solution contains four projects so it will create a DLL for each project. I am not sure this answers your question.

    Thank you. Problem still persist; ribbon disappears.


    Gustavo Miller

    Saturday, December 27, 2014 2:55 PM