Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 272287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:17:34+00:00 2026-05-12T00:17:34+00:00

Prior to Excel 2007, we used to catch the open file event in Excel

  • 0

Prior to Excel 2007, we used to catch the open file event in Excel using vba so that we could show our own open dialog that knew how to find client folders. In Excel 2007 this no longer works, does anyone have any ideas on how it works now>

The basic premise before was create a class with a commandbar button and a related event and then set that commandBarButton when the app opened and it would catch it, but now it does not. Is there another way now?

Public WithEvents cmdBold As Office.CommandBarButton
Private Sub cmdBold_Click (ByVal Ctrl As Office.CommandBarButton, _
CancelDefault As Boolean)
‘ Insert code you want to run in response to this event.
End Sub

http://msdn.microsoft.com/en-us/library/aa189726(office.10).aspx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:17:34+00:00Added an answer on May 12, 2026 at 12:17 am

    Not really up to speed with 2007 yet but I think that the change to the Ribbon UI has changed the way your application works.

    From the “Developer Considerations” section of this lengthy MSDN article:

    Compatibility of Legacy Solutions and Customizations

    Many companies rely on custom
    applications built on the Microsoft
    Office system and solutions that
    integrate Microsoft Office with
    third-party applications. Many of
    these solutions modify the Office UI
    through the Command Bars object model.
    In the 2007 Office release, this code
    continues to work—in most cases
    without modification.

    Changes made to toolbars in Office
    2003 typically appear in the 2007
    release on an Add-Ins tab in the
    Ribbon (see Figure 18). The type of
    customization that appears depends on
    the original design of the add-in. For
    example, if a customization added
    items to the previous menu structure,
    the Office Fluent UI creates a Menu
    Commands group. If the custom code
    added items to the built-in toolbars,
    the Office Fluent UI creates a Toolbar
    Commands group that contains these
    controls. Toolbars added by an add-in
    show up in the Custom Toolbars group.

    Mouse clicks and other events on the
    Add-Ins tab trigger the same results
    as in the previous menus and toolbar
    interface. Add-in code that executes
    when a toolbar button is clicked in
    the previous UI still executes when
    the user clicks the corresponding
    button in the Toolbars group of the
    Add-Ins tab in the 2007 release.

    Requests to hide menus and toolbars or
    to remove controls are ignored. If
    an add-in attempts to repurpose
    built-in functionality by changing the
    behavior of menu items or toolbar
    buttons, such as Save or Print
    Preview, the Office application copies
    the control to the Add-Ins tab and
    changes it there, leaving the original
    control on the Ribbon or Microsoft
    Office Button menu unchanged.

    Although it is possible to remove or
    disable built-in controls
    programmatically in the 2007 release,
    add-ins that remove or reorder menu
    items and toolbar items in previous
    releases of Microsoft Office have no
    effect when they are loaded.

    So, you may well find that you have an additional “Open” control in the Add-Ins tab.

    It seems that re-purposing the built-in control is only possible using XML. From earlier in the same document:

    Opportunities for Extensibility

    Repurposing Built-in Controls. You can take over the function of any built-in control anywhere in the UI by writing a single line of XML that connects the custom code to every instance of the built-in control. You can modify the control to execute custom code and, optionally, proceed with the built-in functionality.

    Finally, this even longer MSDN article explains how XML customization works

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a prior question, I asked about using xbuild to compile a solution file,
Prior to C++11, if I had a function that operated on large objects, my
Prior to the asp.net 4 RC update, I had been using the WebApi for
In a prior post I was trying to upload a file to a server
We have a web-based product that is used for project management and planning. Each
Prior to submitting a form, I would like to check if a file has
I am copying the contents of an Excel file onto the Clipboard within a
Prior to xcode 3.2.1, you could cycle through the list of files your in
Prior to .net 4.0, I implemented a solution using named data slots in System.Threading.Thread.
In Joomla prior to 1.6 i could set a menu-item to public , and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.