Finding Control Names for Use in XML Code

If you want to assign a familiar Access image to a button on the Ribbon, you need to know the name of the standard Access control that uses this image, so you can set the imageMso argument for the button with that name. You can download an Excel worksheet (AccessRibbonControls.xls) with this information from http://www.microsoft.com/downloads/details.aspx?familyid= 432 9d9e9-4d11-46a5-8 98d-23e4f331e9ae&displaylang=en on the Microsoft web site.

Even though Office 2007 has been released, the latest worksheets of control names were prepared during the beta (November 2006), and they are not entirely accurate for the release version of Access, especially for tab names. Hopefully an updated set of worksheets will be posted soon.

However, there is another, more convenient method that works fine for many controls: Open the Access Options screen from the Office menu, and click the Customization page. This page is intended for customizing the Quick Access Toolbar, but it is also very useful for finding out control names for use in XML code. To find a control name, first select the Ribbon tab from the "Choose command from" drop-down list, then select the control in the list. As you hover the mouse over the control, its name appears in parentheses after the friendly name:

Pa pu Ear

Current DataBase Datasheet Object Designers Proofing

Trust Center Resources

Customize the Quick Access Toolbar.

Popular Commands

For all documents (default)

< Separate r> Cache List Data Create E-mail

Excel spreads SharePoint lii

Import | Popular Commands I Form [Create Form)]

Import SharePoint list Import text file Import XML file Manage Replies Mode

Getting the control name for use in assigning an image to a control on the Ribbon.

Removing a Tab or Group from the Ribbon

To remove one of the standard tabs or groups from the Ribbon (in reality, you are hiding it, not deleting it), set its visible attribute to "false", using idMso instead of id to indicate that you are referencing a built-in Ribbon tab or group. The following line of XML code turns off the standard Create tab:

<tab idMso="TabCreate" visible="false"/>

To remove a built-in tab or group from the Ribbon, you need to know its name. The AccessRibbonControls.xls worksheet is useful for finding the names of tabs or groups: just sort the worksheet by Control Type, and look at the tab or group rows. To save time, the names of the standard tabs are listed in Table 15.4.

TABLE 15.4

Built-in Access Ribbon Tab Names

TabAddIns

TabPivotChartDesign

TabAdpDiagramDesign

TabPivotTableDesign

TabAdpFunctionAndViewToolsDesign

TabPrintPreviewAccess

TabAdpSqlStatementDesign

TabQueryToolsDesign

TabAdpStoredProcedureToolsDesign

TabRelationshipToolsDesign

TabControlLayout

TabReportToolsAlignment

TabCreate

TabReportToolsDesign

TabDatabaseTools

TabReportToolsFormatting

TabExternalData

TabReportToolsLayout

TabFormToolsDesign

TabReportToolsPageSetupDesign

TabFormToolsFormatting

TabReportToolsPageSetupLayout

TabFormToolsLayout

TabSourceControl

TabHomeAccess

TabTableToolsDatasheet

TabMacroToolsDesign

TabTableToolsDesignAccess

Table 15.5 lists the standard group names.

TABLE 15.5

Built-in

Access Ribbon Group Names

FileManageMenu

GroupAdpOutputOperations

FilePrintMenu

GroupAdpQueryTools

FileSaveAsMenuAccess

GroupAdpQueryType

FileServerMenu

GroupAdpSqlStatementDesignTools

GroupAdminister

GroupAnalyze

GroupAdpDiagramLayout

GroupAutoFormatAccess

GroupAdpDiagramShowHide

GroupClipboard

continued continued

(continued)

GroupCollectData

GroupMacro

GroupControlAlignment

GroupMacroClose

GroupControlAlignmentLayout

GroupMacroRows

GroupControlPositionLayout

GroupMacroShowHide

GroupControlsAccess

GroupMacroTools

GroupControlSize

GroupMarginsAndPadding

GroupCreateForms

GroupMarginsAndPaddingControlLayout

GroupCreateOther

GroupMoveData

GroupCreateReports

GroupPageLayoutAccess

GroupCreateTables

GroupPivotChartActiveFieldAccess

GroupDatabaseSourceControl

GroupPivotChartDataAccess

GroupDatabaseTools

GroupPivotChartFilterAndSort

GroupDatasheetRelationships

GroupPivotChartShowHide

GroupDataTypeAndFormatting

GroupPivotChartTools

GroupDesignGridlines

GroupPivotTableActiveFieldAccess

GroupExport

GroupPivotTableDataAccess

GroupFieldsAndColumns

GroupPivotTableFilterAndSort

GroupFieldsTools

GroupPivotTableSelections

GroupFindAccess

GroupPivotTableShowHideAccess

GroupFontAccess

GroupPivotTableToolsAccess

GroupFormatting

GroupPosition

GroupFormattingControls

GroupPositionLayout

GroupFormattingGridlines

GroupPrintPreviewClosePreview

GroupGroupingAndTotals

GroupPrintPreviewData

Grouplmport

GroupPrintPreviewPrintAccess

GroupLayoutShowHide

Table 15.6 lists the standard control names.

TABLE 15.6

Built-in Access Ribbon Control Names

AccessRelinkLists

AdpOutputOperationsSortDescending

AddInsMenu

AdpOutputOperationsTableRemove

AdpConstraints

AdpPrimaryKey

AdpDiagramAddRelatedTables

AdpStoredProcedureEditSql

AdpDiagramAddTable

AdpStoredProcedureQueryAppend

AdpDiagramArrangeSelection

AdpStoredProcedureQueryAppendValues

AdpDiagramArrangeTables

AdpStoredProcedureQueryDelete

AdpDiagramAutosizeSelectedTables

AdpStoredProcedureQueryMakeTable

AdpDiagramColumnNames

AdpStoredProcedureQuerySelect

AdpDiagramColumnProperties

AdpStoredProcedureQueryUpdate

AdpDiagramCustomView

AdpVerifySqlSyntax

AdpDiagramDeleteTable

AdpViewDiagramPane

AdpDiagramHideTable

AdpViewGridPane

AdpDiagramIndexesKeys

AdpViewSqlPane

AdpDiagramKeys

AdvertisePublishAs

AdpDiagramModifyCustomView

AlignCenter

AdpDiagramNameOnly

AlignLeft

AdpDiagramNewLabel

AlignLeftToRightMenu

AdpDiagramNewTable

AlignRight

AdpDiagramRecalculatePageBreaks

ApplyCommaFormat

AdpDiagramRelationships

ApplyCurrencyFormat

AdpDiagramShowRelationshipLabels

ApplyFilter

AdpDiagramTableModesMenu

ApplyPercentageFormat

AdpDiagramViewPageBreaks

AutoFormatGallery

AdpManageIndexes

AutoFormatWizard

AdpOutputOperationsAddToOutput

AutoSumAverage

AdpOutputOperationsGroupBy

AutoSumCount

AdpOutputOperationsSortAscending

AutoSumMax

(continued)

AutoSumMin

ControlSpecialEffectMenu

Bold

ControlSpecialEffectRaised

Bullets

ControlSpecialEffectShadowed

BusinessFormWizard

ControlSpecialEffectSunken

CacheListData

ControlSubFormReport

ClearGrid

ControlTabControl

ClearMenuAccess

ControlTitle

CloseDocument

ControlToggleButton

ColumnWidth

ControlUnboundObjectFrame

ComAddInsDialog

ControlWizards

ControlActiveX

ConvertDatabaseFormat

ControlAlignToGrid

Copy

ControlAttachment

CreateClassModule

ControlBoundObjectFrame

CreateDiagram

ControlChart

CreateEmail

ControlImage

CreateForm

ControlLayoutRemove

CreateFormBlankForm

ControlLayoutStacked

CreateFormInDesignView

ControlLayoutTabular

CreateFormMoreFormsGallery

ControlLine

CreateFormPivotChart

ControlLineColorPicker

CreateFormSplitForm

ControlLineThicknessGallery

CreateFormWithMultipleItems

ControlLineTypeGallery

CreateLabels

ControlLogo

CreateMacro

ControlMarginsGallery

CreateModule

ControlPaddingGallery

CreateOtherObjectsMenu

ControlPage

CreateQueryFromWizard

ControlRectangle

CreateQueryInDesignView

ControlSetControlDefaults

CreateReport

ControlSnapToGrid

CreateReportBlankReport

ControlSpecialEffectChiseled

CreateReportFromWizard

ControlSpecialEffectEtched

CreateReportInDesignView

ControlSpecialEffectFlat

CreateShortcutMenuFromMacro

CreateStoredProcedure

Delete

CreateTable

DeleteTab

CreateTableInDesignView

DrillInto

CreateTableTemplatesGallery

DrillOut

CreateTableUsingSharePointListsGallery

ExportAccess

CustomizeHide

ExportDBase

Cut

ExportExcel

DatabaseAccessBackEnd

ExportHtmlDocument

DatabaseAnalyzePerformance

ExportLotus

DatabaseAnalyzeTable

ExportMoreMenu

DatabaseCopyDatabaseFile

ExportOdbcDatabase

DatabaseDocumenter

ExportParadox

DatabaseEncodeDecode

ExportSavedExports

DatabaseLinedTableManager

ExportSharePointList

DatabaseMakeMdeFile

ExportSnapshot

DatabaseMoveToSharePoint

ExportTextFile

DatabaseObjectDependencies

ExportWord

DatabasePartialReplica

ExportXmlFile

DatabasePermissions

FieldList

DatabasePermissionsMenu

FileBackupDatabase

DatabaseRelationships

FileBackUpSqlDatabase

DatabaseSetLogonSecurity

FileCloseDatabase

DatabaseSqlServer

FileCompactAndRepairDatabase

DatabaseSwitchboardManager

FileDatabaseProperties

DatabaseUserAndGroupAccounts

FileDropSqlDatabase

DatabaseUserLevelSecurityWizard

FileManageMenu

DataRefreshAll

FileNewDatabase

DatasheetColumnDelete

FileOpenDatabase

DatasheetColumnLookup

FilePackageAndSign

DatasheetColumnRename

FilePrintMenu

DatasheetNewField

FilePrintPreview

DateAndTimeInsert

FilePrintQuick

DefaultView

FilePublishToSharePoint

^nABQaDSI^H (continued)

FileSave

FindDialog

FileSaveAs

FindNext

FileSaveAsAccess2000

First10RecordsPreview

FileSaveAsAccess2002_2003

Font

FileSaveAsAccess2007

FontAlternateFillBackColorPicker

FileSaveAsMenuAccess

FontColorPicker

FileSaveAsPdfOrXps

FontConditionalFormatting

FileSendAsAttachment

FontFillBackColorPicker

FileServerLinkTables

FontSize

FileServerMenu

FormatCellsDialog

FileServerTransferDatabase

FormatPainter

FilterAdvancedByForm

FormattingDataType

FilterAdvancedMenu

FormattingDecreaseDecimals

FilterAfterSelection

FormattingFormat

FilterBeforeSelection

FormattingIncreaseDecimals

FilterBeginsWithSelection

FormattingRequiredField

FilterBetween

FormattingUnique

FilterBySelection

FormControlButton

FilterClearAllFilters

FormControlCheckBox

FilterContainsSelection

FormControlComboBox

FilterDoesNotBeginsWithSelection

FormControlEditBox

FilterDoesNotContainSelection

FormControlGroupBox

FilterDoesNotEndWithSelection

FormControlLabel

FilterEndsWithSelection

FormControlListBox

FilterEqualsSelection

FormControlRadioButton

FilterExcludingSelection

FormHeaderOrFooterShowHide

FilterIsNotSelected

GoToMenuAccess

FilterIsSelected

GoToNewRecord

FilterLargerThanSelection

GridlinesColorPicker

FilterNotEqualsSelection

GridlinesGallery

FilterSmallerThanSelection

GridlinesStyleGallery

FiltersMenu

GridlinesWidthGallery

FilterToggleFilter

GridShowHide

GroupAddInsCustomToolbars

GroupFormattingControls

GroupAddInsMenuCommands

GroupFormattingGridlines

GroupAddInsToolbarCommands

GroupGroupingAndTotals

GroupAdminister

GroupImport

GroupAdpDiagramLayout

Grouping

GroupAdpDiagramShowHide

GroupLayoutShowHide

GroupAdpOutputOperations

GroupMacro

GroupAdpQueryTools

GroupMacroClose

GroupAdpQueryType

GroupMacroRows

GroupAdpSqlStatementDesignTools

GroupMacroShowHide

GroupAnalyze

GroupMacroTools

GroupAutoFormatAccess

GroupMarginsAndPadding

GroupClipboard

GroupMarginsAndPaddingControlLayout

GroupCollectData

GroupMoveData

GroupControlAlignment

GroupPageLayoutAccess

GroupControlAlignmentLayout

GroupPivotChartActiveFieldAccess

GroupControlPositionLayout

GroupPivotChartDataAccess

GroupControlsAccess

GroupPivotChartFilterAndSort

GroupControlSize

GroupPivotChartShowHide

GroupCreateForms

GroupPivotChartTools

GroupCreateOther

GroupPivotChartType

GroupCreateReports

GroupPivotTableActiveFieldAccess

GroupCreateTables

GroupPivotTableDataAccess

GroupDatabaseSourceControl

GroupPivotTableFilterAndSort

GroupDatabaseTools

GroupPivotTableSelections

GroupDatasheetRelationships

GroupPivotTableShowHideAccess

GroupDataTypeAndFormatting

GroupPivotTableToolsAccess

GroupDesignGridlines

GroupPosition

GroupExport

GroupPositionLayout

GroupFieldsAndColumns

GroupPrintPreviewClosePreview

GroupFieldsTools

GroupPrintPreviewData

GroupFontAccess

GroupPrintPreviewPrintAccess

GroupFormatting

GroupQueryClose

^^TABLEDug^^l (continued)

GroupQueryResults

ImportLotus

GroupQuerySetup

ImportMoreMenu

GroupQueryShowHide

ImportOdbcDatabase

GroupQueryType

ImportOutlook

GroupRecords

ImportParadox

GroupRelationships

ImportSavedImports

GroupRelationshipsTools

ImportSharePointList

GroupRichText

ImportTextFile

GroupSchemaTools

ImportXmlFile

GroupSharePointList

IndentDecrease

GroupSharepointLists

IndentIncrease

GroupSizeAndPosition

Italic

GroupSortAndFilter

LabelFontDialog

GroupSourceControlManage

LoadFromQuery

GroupSourceControlShow

MacroArguments

GroupTableDesignShowHide

MacroConditions

GroupTableDesignTools

MacroConvertMacrosToVisualBasic

GroupTextFormatting

MacroNames

GroupToolsAccess

MacroRun

GroupViews

MacroShowAllActions

GroupViewsShowHide

MacroSingleStep

GroupWindowAccess

MailMergeGoToFirstRecord

GroupZoom

MailMergeGoToNextRecord

HeaderFooterPageNumberInsert

MailMergeGoToPreviousRecord

HideDetails

MailMergeGotToLastRecord

HorizontalSpacingDecrease

ManageReplies

HorizontalSpacingIncrease

MasterViewClose

HorizontalSpacingMakeEqual

MenuPublish

HyperlinkInsert

MergeToWord

ImportAccess

Numbering

ImportDBase

ObjectBringToFront

ImportExcel

ObjectGallery

ImportHtmlDocument

ObjectsAlignBottom

ObjectsAlignLeft

PivotChartMultipleUnified

ObjectsAlignRight

PivotChartSortByTotalAscending

ObjectsAlignTop

PivotChartSortByTotalDescending

ObjectSendToBack

PivotChartSortByTotalMenu

ObjectsGroup

PivotChartType

ObjectsSelect

PivotClearCustomOrdering

ObjectsUngroup

PivotCollapseFieldAccess

OleDdeLinks

PivotCollapseFieldAccess

PageBreakInsertOrRemove

PivotCreateCalculatedTotal

PageHeaderOrFooterShowHide

PivotCreateCalulatedField

PageMarginsGallery

PivotDropAreas

PageOrientationLandscape

PivotExpandField

PageOrientationPortrait

PivotExpandIndicators

PageSetupDialog

PivotExportToExcel

PageSizeGallery

PivotFieldList

Paste

PivotFilterBySelection

PasteAppend

PivotFormulasMenu

PasteDuplicate

PivotGroupItems

PasteSpecial

PivotHideDetails

PasteSpecialDialog

PivotMoveField

PivotAutoCalcAverage

PivotMoveToColumnArea

PivotAutoCalcCount

PivotMoveToDetailArea

PivotAutoCalcMax

PivotMoveToFieldArea

PivotAutoCalcMenu

PivotMoveToFilterArea

PivotAutoCalcMin

PivotRefresh

PivotAutoCalcStandardDeviation

PivotRemoveField

PivotAutoCalcStandardDeviationPopulation

PivotShowAll

PivotAutoCalcSum

PivotShowAsMenu

PivotAutoCalcVariance

PivotShowAsNormal

PivotAutoCalcVariancePopulation

PivotShowAsPercentOfColumnTotal

PivotAutoFilter

PivotShowAsPercentOfGrandTotal

PivotChartLegendShowHide

PivotShowAsPercentOfParentColumnItem

PivotChartMultiplePlots

PivotShowAsPercentOfParentRowItem

continued

^nABQaDSI^H (continued)

PivotShowAsPercentOfRowTotal

QueryCrosstab

PivotShowDetails

QueryDataDefinition

PivotShowOnlyTheBottomMenu

QueryDelete

PivotShowOnlyTheTopMenu

QueryInsertColumn

PivotShowTopAndBottomItemsMenu

QueryInsertColumns

PivotSubtotal

QueryMakeTable

PivotSwitchRowColumn

QueryParameters

PivotUngroupItems

QueryReturnGallery

PositionAnchoringGallery

QueryRunQuery

PositionFitToWindow

QuerySelectQueryType

PostcardWizard

QueryShowTable

PrintColumns

QuerySqlPassThroughQuery

PrintDataOnly

QueryTableNamesShowHide

PrintDialogAccess

QueryTotalsShowHide

PrintPreviewClose

QueryUnionQuery

PrintPreviewEightPages

QueryUpdate

PrintPreviewFourPages

QuickAccessToolbarCustomization

PrintPreviewMultiplePagesMenu

RecordsAddFromOutlook

PrintPreviewTwelvePages

RecordsCollapseAllSubdatasheets

PrintPreviewZoom10

RecordsDeleteColumn

PrintPreviewZoom1000

RecordsDeleteRecord

PrintPreviewZoom150

RecordsExpandAllSubdatasheets

PrintPreviewZoom200

RecordsFreezeColumns

PrintPreviewZoom25

RecordsHideColumns

PrintPreviewZoom50

RecordsInsertSubdatasheet

PrintPreviewZoom500

RecordsMoreRecordsMenu

PrintPreviewZoom75

RecordsRefreshMenu

PrintPreviewZoomMenu

RecordsRefreshRecords

PrintPreviewZoomTwoPages

RecordsRemoveSubdatasheet

PropertySheet

RecordsSaveAsOutlookContact

PublishToPdfOrEdoc

RecordsSaveRecord

QueryAppend

RecordsSubdatasheetMenu

QueryBuilder

RecordsTotals

RecordsUnfreeze

SharePointListsWorkOffline

RecordsUnhideColumns

ShowClipboard

Redo

ShowMargins

RelationshipDesignAllRelationships

SizeToFit

RelationshipsClearLayout

SizeToFitAccess

RelationshipsDirectRelationships

SizeToGridAccess

RelationshipsEditRelationships

SizeToNarrowest

RelationshipsHideTable

SizeToShortest

RelationshipsReport

SizeToTallest

ReplaceDialog

SizeToWidest

ReplicationCreateReplica

SortAndFilterAdvanced

ReplicationOptionsMenu

SortDown

ReplicationRecoverDesignMaster

SortRemoveAllSorts

ReplicationResolveConflicts

SortSelectionMenu

ReplicationSynchronizeNow

SortUp

Revert

SourceControlAddDatabase

RowHeight

SourceControlAddObjects

RulerShowHide

SourceControlCheckIn

SaveAsQuery

SourceControlCheckOut

SaveObjectAs

SourceControlCreateDatabaseFromProject

SelectAllAccess

SourceControlGetLatestVersion

SelectAllRecords

SourceControlOptions

SelectMenuAccess

SourceControlProperties

SelectRecord

SourceControlRefreshStatus

ServerConnection

SourceControlRun

ServerFilterApply

SourceControlShareObjects

ServerFilterByForm

SourceControlShowDifferences

ServerProperties

SourceControlShowHistory

ServerRestoreSqlDatabase

SourceControlUndoCheckOut

SetDatabasePassword

SpellingAccess

SharePointListsDiscardAllChanges

SubformInNewWindow

SharePointListsDiscardAllChangesAndRefresh

SubformMenu

SharePointListsDiscardChangesMenu

SynchronizeData

continued continued

(continued)

TabAddIns

TabReportToolsFormatting

TabAdpDiagramDesign

TabReportToolsLayout

TabAdpFunctionAndViewToolsDesign

TabReportToolsPageSetupDesign

TabAdpSqlStatementDesign

TabReportToolsPageSetupLayout

TabAdpStoredProcedureToolsDesign

TabSetAdpDiagram

TabControlLayout

TabSetAdpFunctionAndViewTools

TabCreate

TabSetAdpSqlStatement

TabDatabaseTools

TabSetAdpStoredProcedure

TabExternalData

TabSetFormReportExtensibility

TabFormToolsDesign

TabSetFormTools

TabFormToolsFormatting

TabSetFormToolsLayout

TabFormToolsLayout

TabSetMacroTools

TabHomeAccess

TabSetPivotChartAccess

TableColumnsDelete

TabSetPivotTableAccess

TableDesign

TabSetQueryTools

TableIndexes

TabSetRelationshipTools

TableListAlertMe

TabSetReportTools

TableListPermissions

TabSetReportToolsLayout

TableRowsDelete

TabSetTableToolsDatasheet

TableRowsInsertWord

TabSetTableToolsDesign

TableSharePointListsModifyColumnsAndSettings

TabSourceControl

TableSharePointListsModifyWorkflow

TabTableToolsDatasheet

TableSharePointListsRefreshList

TabTableToolsDesignAccess

TableTestValidationRules

TextDirectionLeftToRight

TabMacroToolsDesign

TextDirectionRightToLeft

TabOrder

TextHighlightColorPicker

TabPivotChartDesign

TotalsCountRecords

TabPivotTableDesign

TotalsMenu

TabPrintPreviewAccess

TotalsStandardDeviation

TabQueryToolsDesign

TotalsSum

TabRelationshipToolsDesign

TotalsVariance

TabReportToolsAlignment

Underline

TabReportToolsDesign

Undo

VerticalSpacingDecrease

ViewVisualBasicCodeAccess

VerticalSpacingIncrease

VisualBasic

VerticalSpacingMakeEqual

WindowMoreWindowsDialog

ViewMessageBar

WindowNameGoesHere

ViewsAdpDiagramPrintPreview

WindowsArrangeIcons

ViewsAdpDiagramSqlView

WindowsCascade

ViewsDatasheetView

WindowsDataEntry

ViewsDesignView

WindowSplit

ViewsFormView

WindowsSwitch

ViewsLayoutView

WindowsTileHorizontally

ViewsModeMenu

WindowsTileVertically

ViewsModeMenu

WindowUnhide

ViewsPivotChartView

Zoom100

ViewsPivotChartView

ZoomFitToWindow

ViewsPivotTableView

ZoomOnePage

ViewsReportView

ZoomPrintPreviewExcel

ViewsSwitchToDefaultView

The XML code listed next (the Ribbon name is TurnOff) turns off the standard Home tab, and removes the Export group from the External Data tab:

<customUI xmlns=

"http://schemas.microsoft.com/office/2 006/01/customui"> <ribbon startFromScratch="false"> <tabs>

<tab idMso="TabHomeAccess"

<tab idMso="TabExternalData" visible="true"> <group idMso="GroupExport"

visible="false"> </group> </tab> </tabs> </ribbon> </customUI>

In order to see this (or any) custom Ribbon in an Access database, you need to select it in the "Ribbon Name" drop-down list in the Access Options dialog, as shown in Figure 15.8.

Figure 15.5 shows the External Data tab, without the Export group.

FIGURE 15.5

The External Data tab without the Export group.

FIGURE 15.5

0 0

Responses

  • rufus
    How to find the name of an access ribbon?
    6 years ago

Post a comment