Remove Add-ins Tab from the Ribbon at Runtime (1 Viewer)

SmallTime

Registered User.
Local time
Yesterday, 18:29
Joined
Mar 24, 2011
Messages
246
I’m using the following custom ribbon for print previews on reports (no add-ins tab). However, if I use the /runtime switch at startup the Add-ins tab appears and I don’t understand why.

I’m struggling with Ribbons as it is as I don’t fully know how they work, I got the code from someone else. Does anyone know how to permanently remove the Add-ins tab or at the least stop it appearing in runtime mode.

Code:
<mso:customUI xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> 


<ribbon startFromScratch="true">

<tabs>
<tab id="tabPrintPreview" label="Report">

<group id="grpPrint" label="Printer"  visible="true">
<button idMso="PrintDialogAccess" size="large" label="Print" imageMso="PrintDialogAccess" />
<button idMso = "PublishToPdfOrEdoc" size="large" label="PDF"/>
</group>
               
<group id="grpZoom" label="Zoom" >
<splitButton idMso="PrintPreviewZoomMenu" size="large" visible="true"/>
<toggleButton idMso="ZoomFitToWindow" size="large"/>
<toggleButton idMso="ZoomOnePage" size="large"/>
<toggleButton idMso="PrintPreviewZoomTwoPages" size="large"/>
</group>

<group id="grpClosePreview" label="Close report"  visible="true">
<button idMso="PrintPreviewClose" size="large" label="Close" imageMso="PrintPreviewClose"/>
</group>

</tab>
</tabs>
</ribbon>
</customUI>


Many thanks
SmallTime
 

Ari

Registered User.
Local time
Yesterday, 18:29
Joined
Oct 22, 2011
Messages
139
Hello SmallTime

See the VBA help on the method COMAddIn

application.COMAddIns.item("NameAddin").Connect = false

It also has how to disable the "Access Options" in "Trust Center Settings ..."

Another option is to disable all add-ins for the Windows registry. The key is: disableAllAddins

I learned a lot about the ribbons, with the videos on this site: http://www.ribbons-access.com/articles.asp

..
 
Last edited:

SmallTime

Registered User.
Local time
Yesterday, 18:29
Joined
Mar 24, 2011
Messages
246
Thanks for the reply,

I don't have any add-in registered according to the Add-In Manager. however when running

MsgBox "My ProgID is " & _
Application.COMAddIns(1).ProgID & _
" and my GUID is " & _
Application.COMAddIns(1).Guid

It says my add-in is AccessPW.14

so I suppose
application.COMAddIns.item("AccessPW.14").Connect = false
would do the trick. Where's the best place to put this, perhaps in a startup form? or does it have to run before that?

Many thanks for the invaluable pointer

SmallTime
 

SmallTime

Registered User.
Local time
Yesterday, 18:29
Joined
Mar 24, 2011
Messages
246
further:

running
Code:
MsgBox Application.COMAddIns.Item("AccessPW.14").Description

shows the description as "Microsoft Access Package Solution Wizard 2010 com addin"

Anyhow, I'll be reading up on the ComAddin method today to try and get a better handle on this. Still can't understand why the Add-in tab would appear with the /runtme switch.


Regards
SmallTime
PS
You're spot-on with hiding 'Access Options' which is the only reason I wanted to use /runtime in the first place.
 

Ari

Registered User.
Local time
Yesterday, 18:29
Joined
Oct 22, 2011
Messages
139
Hi

If you do not work for the startup form, try the macro AutoExec
 

vbaInet

AWF VIP
Local time
Today, 02:29
Joined
Jan 22, 2010
Messages
26,374
Is this database a migration from an older version, i.e. Access 2000 or 2003, to Access 2007? Perhaps you had custom toolbars or menu bars there. The Add-ins tab normally holds those menus.
 

Users who are viewing this thread

Top Bottom