Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ribbon opens Form 1

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
How do I code (XML) a button to open a form?

What about setting the property of a subform?

Thanks. Sean.
 
in your ribbon XML you will need :
Code:
<customUI xmlns="[URL unfurl="true"]http://schemas.microsoft.com/office/2006/01/customui">[/URL]
 <ribbon  startFromScratch="true">
  <contextualTabs>
   <tabSet idMso="TabSetFormReportExtensibility">
    <tab id="MyTab" label="Home">

       <group id="ListCommands" label="Main Menu">

<button id="btnHome" 
        imageMso="BlogHomePage" size="large" 
        label="Home"
	onAction="mcrRibbon.ShowHome" />

      </group>
 </tab>

   </tabSet>
  </contextualTabs>
 </ribbon>
</customUI>

Then create a macro called 'mcrRibbon'
select to show Macro Names and enter the name "ShowHome"
Macro action = OpenForm
fill out the appropriate details within the macro action
 
Thanks, works great.

Now, lets I want to hide the startfrom scratch, but want to provide the ability to unhide the default tabs after loaded?

Is that possible?

Thanks. Sean.
 
you can change the line <ribbon startFromScratch="true">

to read <ribbon startFromScratch="false">

this will leave all the default tabs on the screen, but also include your new tab.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top