Disable button from addins Outlook 2007

A

Andrey_R

Hi!
I have addins Outlook 2003. Cobe write VB6. I wont to treasfer it to Visual
Studio 2005 for Outlook 2007. And I have problem.
In Outlook 2003 I operate visibility button when I open massage in INBOX. I
write code
Dim comBarCtrl As CommandBarControls
Dim createButton As CommandBarControl

For countId = 354 To 356
' button "Replay" to button "Forward"
Set comBarCtrl = Toolbars.FindControls(Id:=countId)
For Each createButton In comBarCtrl
createButton.Enabled = False
Next
Next

But this code doesn't work in Visual Studio 2005. This button don't visible
operation There use ribbon.
What can I connect to ribbon and button "Resend"..."Forward" on the ribbon?
 
K

Ken Slovak - [MVP - Outlook]

You address ribbon controls using the idMso of the control but there is not
method for setting enabled = false for a specific control like you want.
Instead you have to use ribbon XML and callbacks. For built-in controls like
"Forward", "Reply" and "ResendThisMessage" (those are the idMso's) you would
need to use the StartFromScratch XML tag and basically re-create the UI you
want to show from scratch.

See
http://msdn2.microsoft.com/en-us/li...ols.ribbon.officeribbon.startfromscratch.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top