Quick Search


Tibetan singing bowl music,sound healing, remove negative energy.

528hz solfreggio music -  Attract Wealth and Abundance, Manifest Money and Increase Luck



 
Your forum announcement here!

  Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums > Post Your Free Ads Here in English for Advertising .Adult and gambling websites NOT accepted. > Post Your Income Opportunities Here

Post Your Income Opportunities Here This section is for posting your free classified ads about MLM, downline, upline, matrix, affiliate programs, and other opportunities to help you earn money at home on the Internet.

Reply
 
Thread Tools Display Modes
Old 05-24-2011, 05:29 AM   #1
wtixh965
 
Posts: n/a
Default Microsoft Office 2007 Enterprise Ribbon Customizat

Sue and I were talking the other day about Ribbon customizations with regard to some training materials that she is preparing for our support engineers. Along the way I mentioned command repurposing and how you could do some pretty cool stuff with it in Access applications. She suggested that this might make a good blog post and I think she's right.I've been working on an application to track the work that I do throughout the year, and thought I would add a database password to encrypt the database. Since Access has this command built in on the Ribbon, I could use the idMso attribute of a button set to SetDatabasePassword to add this command to my database. Cool - however,Microsoft Office 2007 Enterprise, adding a database password requires that the database is opened exclusively, and I didn't really want to see the built-in error message with the built-in command. Enter command repurposing.Repurposing a command refers to the ability to use a built-in command in the Ribbon, but to provide your own functionality with that command. In my scenario, I wanted Access to encrypt the database, but I want my own error message when the database is not opened exclusively. To do this is actually quite simple. In the XML for the customization, specify the command that you want to repurpose using the command element. Then, specify the control that you want to use (in this case, the SetDatabasePassword button) in a Ribbon.<customUI xmlns="">
<commands>
<command idMso="SetDatabasePassword" onAction="OnSetPassword"/>
</commands>
<ribbon>
<tabs>
<tab id="tabTab1" label="Password">
<group id="grpGroup1" label="Password">
<button idMso="SetDatabasePassword" size="large" label="Set Password"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Add this XML to a USysRibbons table and set the RibbonName property of the database to match the entry in the table.The onAction callback of a repurposed command is slightly different from that of a regular control in that it allows you to indicate whether or not to cancel the default action of the built-in command. Add the following code for the OnSetPassword callback routine:Public Sub OnSetPassword(control As IRibbonControl,Windows 7 Ultimate, ByRef CancelDefault)
If (CurrentProject.Connection.Properties!Mode = 12) Then
CancelDefault = False
Else
MsgBox "You must open the database exclusively to set the database password.",Windows 7 Professional, _
vbExclamation, "Cannot Set Password"
CancelDefault = True
End If
End SubIf the database is opened exclusively (Mode=12), we'll allow the default action to continue by setting the CancelDefault parameter to False. If the database is not opened exclusively,Windows 7 Pro, we'll stop the built-in action by setting it this argument to True. To try this out,Office 2007 Serial, click the button in the new tab that was added by the customization.Thanks Sue for the suggestion! <div
  Reply With Quote

Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 04:36 PM.

 

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum