RibbonX: Customizing The Office 2007 Ribbon

2y ago
28 Views
2 Downloads
1.01 MB
53 Pages
Last View : 10d ago
Last Download : 3m ago
Upload by : Isobel Thacker
Transcription

RibbonX:Customizing the Office 2007 RibbonChapter 7: comboBox and dropDown ControlsISBN: 978-0-470-19111-8Copyright of Wiley Publishing, Inc.Posted with Permission

91118ftoc.qxd:WileyRedTight12/3/079:54 AMPage xiiiContentsIntroductionPart IChapter 1Chapter 2xxixThe Building Blocks for a Successful Customization1An Introduction to the Office User Interface3What Is the Ribbon and Why Does It Exist?Problems with the Old UIIssues Solved with the New UIIssues Created with the New UIWhat Happened to the Toolbars from My Pre-2007 Files?A Customization Example for Pre-2007 UIsRibbon ComponentsTips for Navigating the Ribbon and Quick Access Toolbar (QAT)Using Keyboard Shortcuts and KeytipsUsing the Mouse WheelMinimizing and Maximizing the RibbonAdding Commands to the QATAssigning a Macro to a QAT ButtonChanging the QAT LocationPreparing for Ribbon CustomizationShowing the Developer TabShowing CustomUI Errors at Load TimeReviewing Office 2007 SecurityHas Customization of the Office UI Become 27Accessing the UI Customization Layer29Accessing the Excel and Word Ribbon Customization LayersWhat’s New in Excel and Word Files?Creating a Ribbon Customization with Notepad303030xiii

91118ftoc.qxd:WileyRedTightxiv12/3/079:54 AMPage xivContentsChapter 3Creating the customUI FileCreating the File to Use the Customized UIAttaching the XML to the FileUsing the Microsoft Office 2007 Custom UI Editor toModify Your UIInstalling Microsoft .NET Framework 2.0 forWindows XP UsersInstalling the Microsoft Office 2007 Custom UI EditorUsing the CustomUI Editor to Customize the RibbonStoring Customization Templates in the CustomUI EditorSome Notes About Using the CustomUI EditorXML NotepadInstalling XML NotepadUsing XML NotepadThe Benefits of XML NotepadThe Drawbacks of XML NotepadA Final Word on Excel and Word CustomizationsMicrosoft Access CustomizationsStoring the CustomUI Information in TablesCreating an Access UI Modification Using a TableAccess USysRibbons CaveatOther Techniques for Access UI 48484949515252Understanding XML55What Is XML and Why Do You Need It?Essential BackgroundTagsElementsAttributesThe id AttributeThe label AttributeTips for Laying Out XML CodeCreating Comments in XML CodeThe Core XML FrameworkThe customUI ElementRequired Attributes of the customUI ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the customUI ElementThe ribbon ElementRequired Attributes of the ribbon ElementOptional Static AttributesAllowed Children Objects of the ribbon ElementGraphical View of ribbon AttributesThe tabs ElementRequired Attributes of the tabs ElementAllowed Children Objects of the tabs 970

91118ftoc.qxd:WileyRedTight12/3/079:54 AMPage xvContentsChapter 4The tab ElementRequired Attributes of the tab ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the tab ElementGraphical View of tab AttributesBuilt-in TabsReferring to Built-in TabsModifying a Built-in TabCustom TabsCreating Custom TabsPositioning Custom TabsThe group ElementRequired Attributes of the group ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the group ElementGraphical View of group AttributesBuilt-in GroupsReferring to Built-in GroupsUsing a Built-in Group on a Custom TabCustom GroupsCreating Custom GroupsPositioning Custom GroupsCustom Groups on Built-in TabsConclusion7678798080818383838585Introducing Visual Basic for Applications (VBA)87Getting Started with Visual Basic for Applications (VBA)What Is VBA?Macro-Enabled DocumentsUsing the Visual Basic Editor (VBE)Recording Macros for Excel and WordA Recording ExampleEditing the Recorded MacroEditing Macro Options After RecordingSubprocedures versus FunctionsObject ModelSubproceduresFunctionsVBA Coding TechniquesLooping StatementsFor-Next LoopsDo-While/Do-Until LoopsWith . . . End With StatementIf . . . Then . . . Else . . . End If StatementSelect Case 6979898100101101102105106107109xv

91118ftoc.qxd:WileyRedTightxvi12/3/079:54 AMPage xviContentsChapter 5Writing Your Own CodeNaming ConventionsData TypesWorking with EventsWorkbook EventsWorksheet EventsForm and Report Events in AccessDocument-Level Events in WordApplication-Level EventsThe Object BrowserReferencing LibrariesEarly and Late Bindings ExplainedDebugging Your CodeDebug.Print and Debug.AssertStop StatementImmediate WindowLocals WindowWatches WindowError HandlingOn Error Resume NextOn Error GoToWorking with ArraysDetermining the Boundaries of an ArrayResizing : The Key to Adding Functionalityto Your Custom UI145Callbacks: What They Are and Why You Need ThemSetting Up the File for Dynamic CallbacksCapturing the IRibbonUI ObjectAdjusting the XML to Include onLoadSetting Up VBA Code to Handle the onLoad EventGenerating Your First CallbackWriting Your Callback from ScratchUsing the Office CustomUI Editor to Generate CallbacksUnderstanding the Order of Events When a File Is OpenCan I Have Two Callbacks with the Same NameBut Different Signatures?Calling Procedures Located in Different WorkbooksOrganizing Your CallbacksIndividual Callback HandlersUsing Global Callback HandlersHandling Callbacks in AccessUsing VBA to Handle CallbacksUsing Macros to Handle 7158158160

91118ftoc.qxd:WileyRedTight12/3/079:54 AMPage xviiContentsChapter 6Invalidating UI ComponentsWhat Invalidating Does and Why You Need ItInvalidating the Entire RibbonInvalidating Individual ControlsConclusion162162163165167RibbonX Basic Controls169The button ElementRequired Attributes of the button ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the button ElementParent Objects of the button ElementGraphical View of button AttributesUsing Built-in button ControlsA button Idiosyncrasy: The showLabel AttributeCreating Custom button ControlsAn Excel ExampleA Word ExampleAn Access ExampleThe checkBox ElementRequired Attributes of the checkBox ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the checkBox ElementParent Objects of the button ElementGraphical View of checkBox AttributesUsing Built-in checkBox ControlsCreating Custom ControlsAn Excel ExampleA Word ExampleAn Access ExampleThe editBox ElementRequired Attributes of the editBox ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the editBox ElementParent Objects of the editBox ElementGraphical View of editBox AttributesUsing Built-in editBox ControlsCreating Custom ControlsAn Excel ExampleA Word ExampleAn Access ExampleThe toggleButton ElementRequired Attributes of the toggleButton ElementOptional Static and Dynamic Attributes withCallback 200200203205209209210xvii

91118ftoc.qxd:WileyRedTight12/3/079:54 AMPage xviiixviii ContentsChapter 7Allowed Children Objects of the toggleButton ElementParent Objects of the toggleButton ElementGraphical View of toggleButton AttributesUsing Built-in toggleButton ControlsCreating Custom ControlsAn Excel ExampleA Word ExampleAn Access ox and dropDown Controls225The item ElementRequired Attributes of the item ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the item ElementParent Objects of the item ElementGraphical View of item AttributesUsing Built-in ControlsCreating Custom ControlsThe comboBox ElementRequired Attributes of the comboBox ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the comboBox ElementParent Objects of the comboBox ElementGraphical View of comboBox AttributesUsing Built-in ControlsCreating Custom ControlsAn Excel ExampleA Word ExampleAn Access ExampleThe dropDown ElementRequired Attributes of the dropDown ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the dropDown ElementParent Objects of the dropDown ElementGraphical View of dropDown AttributesUsing Built-in ControlsCreating Custom ControlsAn Excel ExampleA Word ExampleAn Access 9254258261

91118ftoc.qxd:WileyRedTight12/3/079:54 AMPage xixContentsChapter 8Custom Pictures and GalleriesCustom PicturesSuggested Picture FormatsAppropriate Picture Size and ScalingAdding Custom Pictures to Excel or Word ProjectsUsing the Custom UI EditorLoading Custom Pictures On-the-FlyAdding Custom Pictures to Access ProjectsUsing GDI to Load PNG FilesUsing the Gallery ControlExample of Static AttributesExample of Built-in ControlsCreating an Image Gallery On-the-FlyConclusionChapter 9Creating MenusThe menu ElementRequired Attributes of the menu ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the menu ElementParent Controls of the menu ElementGraphical View of menu AttributesUsing Built-in ControlsCreating Custom ControlsAn Excel ExampleA Word ExampleAn Access ExampleThe splitButton ElementRequired Attributes of the splitButton ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the splitButton ElementParent Objects of the splitButton ElementGraphical View of splitButton AttributesUsing Built-in ControlsCreating Custom ControlsAn Excel ExampleA Word ExampleAn Access ExampleThe dynamicMenu ElementRequired Attributes of the dynamicMenu ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the dynamicMenu ElementParent Objects of the dynamicMenu 301302303303305306310310311313313xix

91118ftoc.qxd:WileyRedTightxx12/3/079:54 AMPage xxContentsGraphical View of dynamicMenu AttributesUsing Built-in ControlsCreating Custom ControlsConclusionChapter 10 Formatting ElementsThe box ElementRequired Attributes of the box ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the box ElementParent Objects of the box ElementGraphical View of box AttributesUsing Built-in box ElementsCreating Custom box ElementsHorizontal AlignmentVertical AlignmentNesting box ControlsThe buttonGroup elementRequired Attributes of the buttonGroup elementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the buttonGroup ElementParent Objects of the buttonGroup ElementGraphical View of a buttonGroupUsing Built-in buttonGroup ElementsCreating Custom buttonGroup ElementsThe labelControl ElementRequired AttributesOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the labelControl ElementParent Objects of the labelControl ElementGraphical View of a labelControlUsing Built-in labelControl ElementsCreating Custom labelControl ElementsThe separator ElementRequired Attributes of the separator ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the separator ElementParent Objects of the separator ElementGraphical View of a SeparatorUsing Built-in separator ElementsCreating Custom separator 1341344344345346346346346346

91118ftoc.qxd:WileyRedTight12/3/079:54 AMPage xxiContentsThe menuSeparator ElementRequired Attributes of the menuSeparator ElementOptional Static and Dynamic Attributes withCallback SignaturesAllowed Children Objects of the menuSeparator ElementParent Objects of the menuSeparator ElementGraphical View of the menuSeparator ElementUsing Built-in menuSeparator ElementsCreating Custom menuSeparator ElementsConclusionChapter 11 Using Controls and Attributes to Help Your UsersPart II347347348349349349350350352355The dialogBoxLauncher ElementRequired and Optional AttributesAllowed Children ObjectsParent ObjectsExamples of Using the dialogBoxLauncher ElementBuilt-in dialogBoxLaunchersA Custom dialogBoxLauncher with Built-in DialogsCustom dialogBoxLauncher with Custom UserformsThe keytip AttributeCreating a KeytipKeytip Idiosyncrasiesscreentip and supertip AttributesCreating screentip and supertip AttributesOverwriting Built-in Control 364366366368369Advanced Concepts in Ribbon Customization371Chapter 12 Advanced VBA TechniquesWorking with CollectionsDetermining Whether an Item Belongs to a CollectionClass ModulesProperties, Methods, and EventsWorking with PropertiesWorking with MethodsWorking with EventsWeb Services and CustomUIUsing VBA Custom PropertiesSetting Up the Custom PropertiesSaving and Retrieving Values from the RegistryConclusionChapter 13 Overriding Built-in Controls in the RibbonStarting the UI from ScratchSetting the startFromScratch AttributeActivating a Tab at StartupDisabling and Repurposing 402402404406xxi

91118ftoc.qxd:WileyRedTightxxii12/3/079:54 AMPage xxiiContentsDisabling Commands, Application Options, and ExitDisabling CommandsDisabling the Commands Associated with the ApplicationOptions and Exit ControlsRepurposing a Command Associated with a Generic ControlAffecting the Keyboard Shortcuts and KeytipsConclusionChapter 14 Customizing the Office Menu and the QATAdding Items to the Office MenuAdding Items to the QATCustomization OverviewsharedControls versus documentControlsAdding Custom and Built-in Commands to the QATAdding Custom and Built-in Groups to the QATRepurposing QAT ControlsTable-Driven Approach for QAT Customization(Excel and Word)Table-Driven Approach for QAT Customization (Access)QAT CaveatsInability to Load ControlsInability to Load Custom Images to ControlsDuplication of Controls on XML-Based andXML-Free CustomizationsConclusionChapter 15 Working with Contextual ControlsMaking Your Items ContextualTabsGroupsWorking Through Nonvisibility MethodsEnabling and Disabling ControlsWorking with Contextual Tabs and tabSetsCreating a Custom Contextual Tab in AccessRenaming a tabSetModifying Built-in Contextual TabsWorking with Contextual Pop-up MenusReplacing Built-in Pop-up Menus in Their EntiretyAdding Individual Items to Pop-up MenusMultilingual UIConclusionChapter 16 Sharing and Deploying Ribbon CustomizationsExcel Deployment TechniquesDistributing WorkbooksUsing TemplatesCreating and Deploying Add-insPreparing a Workbook for Conversion to an Add-inConverting a Workbook to an Add-in 47448453455458459460460461463464465

91118ftoc.qxd:WileyRedTight12/3/079:54 AMPage xxiiiContents xxiiiInstalling an Add-inUnloading and Removing Add-insToggling the IsAddin PropertyA Note on the PERSONAL.XLSB WorkbookWord Deployment TechniquesDistributing DocumentsUsing TemplatesConfiguring Template DirectoriesCreating TemplatesGlobal TemplatesPreparing a Document for Conversion to a Global TemplateConverting a Template to a Global TemplateEditing Global TemplatesRemoving Global TemplatesA Note on the Normal.dotm TemplateSharing Ribbon Items Across Files(Word and Excel)Creating a Shared NamespaceSharing Tabs and Groups in ExcelSharing Tabs and Groups in WordDeploying Word and Excel Solutions Where MultipleVersions of Office are in UseDo Legacy CommandBar Customizations Still Work?Method 1: Creating Separate VersionsMethod 2: Calling a Previous Version from a New Add-inUsing a 2003 Excel Add-in as a Front-End Loader for a2007 Add-inUsing a Word 2007 Global Template as a Front-Endfor a 2003 TemplateAccess Deployment TechniquesGeneral Information Concerning Database DeploymentPreparing the Files for Multi-User EnvironmentsManaging Access Startup OptionsLeveraging the startFromScratch AttributeAdjusting Access Options for Your UsersCreating an ACCDE FileLoading the customUI from an External SourceDeploying Solutions to Users with Full-Access InstallationsDeploying Customizations with Full Versions of AccessDeploying Solutions to Users with the Access Runtime VersionConclusionChapter 17 Security In Microsoft OfficeSecurity Prior to Office 2007Macro-Enabled and Macro-Free File FormatsThe Trust CenterTrusted 508510511514514518519523524524525526

91118ftoc.qxd:WileyRedTightxxiv12/3/079:54 AMPage xxivContentsTrusted LocationsAdding, Modifying, or Removing Trusted LocationsTrusting Network LocationsDisabling Trusted LocationsAdd-insRequiring Add-ins to Be SignedDisabling Notification for Unsigned Add-insDisabling All Add-insActiveX SettingsMacro SettingsSetting Macro OptionsTrusting VBA Project AccessMessage BarPrivacy OptionsDigital CertificatesHow Digital Certificates WorkAcquiring a Digital CertificateUsing SELFCERT.exe to Create a Digital SignatureAdding a Digital Certificate to a ProjectTrusting a Digital Certificate on Another MachineDeleting a Digital Certificate from Your MachineConclusionAppendix A Tables of RibbonX TagsHow to Use This AppendixRibbon Container ElementscustomUI Elementribbon ElementcontextualTabs ElementtabSet Elementqat ElementsharedControls ElementdocumentControls ElementofficeMenu Elementtabs Elementtab Elementgroup ElementRibbon Control Elementsbox Elementbutton ElementbuttonGroup ElementcheckBox ElementcomboBox ElementdialogBoxLauncher ElementdropDown ElementdynamicMenu 549549550550551552553553556557558562562566

91118ftoc.qxd:WileyRedTight12/3/079:54 AMPage xxvContentseditBox Elementgallery Elementitem ElementlabelControl Elementmenu ElementmenuSeparator Elementseparator ElementsplitButton ElementtoggleButton Element568571575576577579580581582Appendix B Tables of Tab and Group idMso Names587Common Tab idMso IdentifiersContextual Tab idMso IdentifiersContextual Tab idMso Identifiers for ExcelContextual Tab idMso Identifiers for AccessContextual Tab idMso Identifiers for WordGroup idMso IdentifiersExcel’s Group idMso IdentifiersAccess’s Group idMso IdentifiersWord’s Group idMso IdentifiersAppendix C imageMso Reference GuideHow to Get Your Own imageMso ReferencesYour Own Reference ToolAppendix D Keytips and Accelerator keysKeytips and Accelerator Keys for endix E RibbonX Naming Conventions615How Our Naming System WorksNaming Samples615617Appendix F Where to Find HelpWebsites with RibbonX InformationWebsites Maintained by the Authoring and Tech Edit TeamNewsgroupsWeb ForumsIndex621621623623624627xxv

91118c07.qxd:WileyRedTight11/28/079:16 PMPage 225CHAPTER7comboBox anddropDown ControlsIn the previous chapter, you learned about the button, checkBox, editBox, andtoggleButton controls. This chapter explores two new controls: the comboBoxand the dropDown. The comboBox and dropDown list are similar in a great many ways,including design, implementation, and appearance. They also have some importantdifferences that are discussed in this chapter.Before you can start exploring these two controls, you need to learn about the fundamental element that supports them: the item element. The chapter begins by exploring this critical piece.Following the section on the item element, you’ll find both the comboBox and dropDownsections, which explore these two elements in great detail. As in the previous chapter,examples are included for each application, some of which display the creation of staticversions of controls, while others create fully dynamic versions. Whether you’re workingthrough the examples or just reading the chapter, you will appreciate seeing a fully functioning version. As you are preparing to work through the examples, we encourage youto download the companion files. The source code and files for this chapter can be foundon the book’s web site at www.wiley.com/go/ribbonx.The item ElementThe item element is used to create static items that must be used within a gallery,dropDown, or comboBox. This particular element is not intended for use on its own, butrather must be an integral part of other controls, such as those mentioned above.225

91118c07.qxd:WileyRedTight226Part I 11/28/079:16 PMPage 226The Building Blocks for a Successful CustomizationUnlike other sections of this book, where we provide full working examples of theelement being discussed, we review only the XML construct and discuss the structureof the item element. This departure from the pattern reflects the fact that the item element is so tightly integrated with the comboBox, dropDown, and gallery controls that itcannot be separated from them. Because of this, you need to know a little bit aboutitem before you can move on. The way these are used may seem rather complicated fornow, but rest assured that the processes will become surprisingly clear when youexamine the comboBox and dropDown RibbonX elements later in this chapter.Required Attributes of the item ElementEach item requires a unique id attribute, as described in Table 7-1.Table 7-1: Required Attribute of the item ElementATTRIBUTEWHEN TO USEidUse this attribute to create your own item.The item element has only one attribute, the id. As we just mentioned, the item control must be used in conjunction with other elements; therefore, it relies on the otherelements for all other attributes.N OT E Unlike other elements, there is no idMso or idQ attribute available forthe item control.Optional Static and Dynamic Attributeswith Callback SignaturesEach item element can optionally make use of any or all of the attributes shown inTable 7-2.Table 7-2: Optional Attributes for the item SDEFAULTVALUEVBA CALLBACKSIGNATURE FORDYNAMIC ATTRIBUTEimage(none)1 to 1024characters(none)(none)imageMso(none)1 to 1024characters(none)(none)label(none)1 to 1024characters(none)(none)

91118c07.qxd:WileyRedTight11/28/079:16 PMPage 227Chapter 7 comboBox and dropDown Controls 227Table 7-2 ALUESDEFAULTVALUEVBA CALLBACKSIGNATURE FORDYNAMIC ATTRIBUTEscreentip(none)1 to 1024characters(none)(none)supertip(none)1 to 1024characters(none)(none)Did you notice the lack of callback signatures in Table 7-2?It is important to understand that the items in the XML code underlying Ribbonmodifications are always static. This is actually a good thing, as it means that you canprovide a static list of items to the control without having to write a single line of VBA.Don’t misunderstand this to mean that you can’t create items for a control on-the-flyusing VBA, as that is not the case. When you create an item for a control, the callbackis actually associated with the Parent object (i.e., the comboBox, dropDown, or gallerycontrol), not the actual item itself.N OT E As you design your XML code, you are given a choice between usingstatic item elements (specified in your XML), or dynamic elements (generatedvia the parent control’s callback signature.) Whichever route you choose ismutually exclusive of the other. In other words, if you specify static items fora control, you cannot also specify dynamic items for that control as well.Allowed Children Objects of the item ElementThe item element does not support child objects of any kind, so it cannot have anyembedded controls.Parent Objects of the item ElementAn item may only be used in the following controls: comboBox dropDown galleryGraphical View of item AttributesFigure 7-1 shows a dropDown control on a Ribbon group. It houses three static itemelements that are written into the XML code. The callouts annotate where the item’sstatic attributes are displayed.

91118c07.qxd:WileyRedTight228Part I 11/28/079:16 PMPage 228The Building Blocks for a Successful CustomizationFigure 7-1: Graphical view of the item elementsUsing Built-in ControlsYou don’t have the opportunity to leverage built-in item elements because Microsoftdoes not expose them for our use, but the chances are fairly good that you wouldn’twant to use them anyway, so it’s not really a big loss. If you did want to have some ofthese items in a control, you could just include the entire parent element in your Ribbon.Creating Custom ControlsWe explore the setup for the parent controls shortly, so this section focuses on theunderlying XML code needed to create the static item elements demonstrated inFigure 7-1.As mentioned earlier, Figure 7-1 makes use of a dropDown control to house theseitems. The dropDown control should be constructed, like all controls, with opening andclosing XML tags. The following code goes between those tags: item id ”rxitemddColor1”imageMso ”AppointmentColor1”label ”Red”screentip ”This is Red!”supertip ”Trust me, it really is Red!”/ item id ”rxitemddColor2”imageMso ”AppointmentColor2”label ”Blue”screentip ”This is Blue!”supertip ”Trust me, it really is Blue!”/ item id ”rxitemddColor3”imageMso ”AppointmentColor10”label ”Yellow”screentip ”This is Yellow!”supertip ”Trust me, it really is Yellow!”/ As you review Figure 7-1, you will see each of the elements in the live representationon the Ribbon.

91118c07.qxd:WileyRedTight11/28/079:16 PMPage 229Chapter 7 comboBox and dropDown Controls 229The comboBox ElementThe comboBox control displays data based on a designated record source, and it is ahybrid of the editBox that we covered in Chapter 6 and the dropDown control that wereview next.One of the great features of a comboBox control is that, in addition to being able topick something from the list, the user can also type something into the text box. Insearching and selecting from the list, it acts like a “hot lookup,” enabling users to skipto the closest match. As the user keeps typing, the choices are narrowed down. At anytime, users may accept one of the displayed values or they may keep typing to create anew entry.The comboBox is best used in the following situations: The list is very long and you wish to give users the capability to quickly jumpto the appropriate place by typing a few keys. (The fonts control is a goodexample of this.) You wish to present users with a pre-defined list, but also want them to be ableto add items to the list.As mentioned earlier in the chapter, you can populate the comboBox with both staticlists and dynamically created lists.Required Attributes of the comboBox ElementThe comboBox control requires any one of the id attributes shown in Table 7-3.Table 7-3: Required id Attributes of the comboBox ElementATTRIBUTEWHEN TO USEidWhen creating your own comboBoxidMsoWhen using an existing Microsoft comboBoxidQWhen creating a comboBox shared between namespacesOptional Static and Dynamic AttributeswithCallback SignaturesIn addition to the required id attribute, the comboBox control will optionally accept anyone of the insert attributes listed in Table 7-4.

91118c07.qxd:WileyRedTight230Part I 11/28/079:16 PMPage 230The Building Blocks for a Successful CustomizationTable 7-4: Optional insert Attributes of the comboBox NTO USEinsertAfterMsoValid Mso GroupInsert at endof groupInsert after MicrosoftcontrolinsertBeforeMsoValid Mso GroupInsert at endof groupInsert beforeMicrosoft controlinsertAfterQValid Group idQInsert at endof groupInsert after sharednamespace controlinsertBeforeQValid Group idQInsert at endof groupInsert before sharednamespace controlFinally, the comboBox may also be configured to use any or all of the optional attributes or callbacks shown in Table 7-5.Table 7-5: Optional Attributes and Callbacks of the comboBox ElementVBA CALLBACKALLOWED DEFAULT SIGNATURE FORVALUESVALUEDYNAMIC ange1 to 4096characters(none)Sub OnChange (controlAs IRibbonControl, text AsString)enabledgetEnabledtrue, false,1, 0trueSub GetEnabled (controlAs IRibbonControl, ByRefreturnedVal)imagegetImage1 to 1024characters(none)Sub GetImage (controlAs IRibbonControl, ByRefreturnedVal)imageMsogetImage1 to 1024characters(none)Same as above(none)getItemCount1 to 1024(none)Sub GetItemCount (controlAs IRibbonControl, ByRefreturnedVal)(none)getItemID1 to 1024characters(none)Sub GetItemID (control AsIRibbonControl, indexAs Integer, ByRef id)(none)getItemImageUniquetext string(none)Sub GetItemImage (controlAs IRibbonControl, index AsInteger, ByRef returnedVal)

91118c07.qxd:WileyRedTight11/28/079:16 PMPage 231Chapter 7 comboBox and dropDown Controls 231Table 7-5 (continued)VBA CALLBACKALLOWED DEFAULT SIGNATURE FORVALUESVALUEDYNAMIC temLabel1 to 1024characters(none)Sub GetItemLabel (controlAs IRibbonControl, index AsInteger, ByRef returnedVal)(none)getItem Screentip1 to 1024characters(none)Sub GetItemScreenTip(control As IRibbonControl,index As Integer, ByRefreturnedVal)(none)getItemSupertip 1 to 1024characters(none)Sub GetItemSuperTip(control As IRibbonControl,index As Integer, ByRefreturnedVal)keytipgetKeytip1 to 3characters(none)Sub GetKeytip (controlAs IRibbonControl, ByRefreturnedVal)labelgetLabel1 to 1024characters(none)Sub GetLabel (control AsIRibbonControl, ByRefreturnedVal)maxLength(none)1 to 10241024(none)screentipgetScreentip1 to 1024characters(none)Sub GetScreentip (controlAs IRibbonControl, ByRefreturnedVal)showImagegetShowImagetrue, false,1, 0trueSub GetShowImage (controlAs IRibbonControl, ByRefreturnedVal)showItem Attribute(none)true, false,1, 0true(none)showItemImage(none)true, false,1, 0true(none)showLabelgetShowL

What Happened to the Toolbars from My Pre-2007 Files? 9 A Customization Example for Pre-2007 UIs 10 Ribbon Components 16 Tips for Navigating the Ribbon and Quick Access Toolbar (QAT) 17 Using Keyboard Shortcuts and Keytips 17 Using the Mouse Wheel 19 Minimizing and Maximizing the Ribbon 19

Related Documents:

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

Chính Văn.- Còn đức Thế tôn thì tuệ giác cực kỳ trong sạch 8: hiện hành bất nhị 9, đạt đến vô tướng 10, đứng vào chỗ đứng của các đức Thế tôn 11, thể hiện tính bình đẳng của các Ngài, đến chỗ không còn chướng ngại 12, giáo pháp không thể khuynh đảo, tâm thức không bị cản trở, cái được

Choosing custom touch functions 27 CUSTOMIZING INTUOS PRO 28 Customizing the pen 29 Adjusting tip feel and double-click 30 Adjusting eraser feel 31 Advanced tip and eraser pressure settings 31 Customizing tool buttons 32 Customizing the ExpressKeys 33 Customizing the Touch Ring 34 Tablet to screen mapping 35 Portion of screen area 37

Mary plans to take Colin to see the secret garden. Mary’s visits make Colin feel a lot better. Martha’s brother, Dickon, visits Colin one day with Mary and brings lots of tame animals with him. Colin is delighted. Mary and Dickon take Colin secretly into the garden. Colin realises it is his mother’s garden, and says he will come every day. Colin spends a lot of time in the garden with .