More programming on the Microsoft Office command bar (3)

Source: Internet
Author: User

Commandbar1_enter and commandbarcontrol1_enter subroutines
When developing a command bar solution, I often need to obtain the index, name, or title of a specific command bar or command bar control. I created CommandBarDocumenter and commandbarcontrol1_enter subroutines to record the public properties of all command bar and command bar controls in a given Office application.
To run these examples, copy the following code to the Code module of the Microsoft Office XP application in Visual Basic Editor, and then run one or both of the following subroutines. When a prompt appears, save the result as a text file (.txt ). This makes it easier to load results to applications (such as Microsoft Excel) for viewing and filtering.
Public Sub CommandBarDocumenter ()
'Purpose: Set information about all command columns in the current application.
'Write a text file.

'You must first set a reference to the Microsoft Script Runtime
'(Scrrun. dll) to make this code run correctly.

'Note: This code is only applicable to Microsoft Office XP.

Dim objCommandBar As Office. CommandBar
Dim strType As String
Dim strPosition As String
Dim objFileSaveDialog As Office. FileDialog
Dim objFSO As Scripting. FileSystemObject
Dim objTextStream As Scripting. TextStream
Const SAVE_BUTTON As Integer =-1

Set objFileSaveDialog = Application. FileDialog (msoFileDialogSaveAs)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.