commandbarcontrols collection working with Outlook 11

F

Francesco

Following macro:
Sub EnumerateControls()
Dim icbc As Integer
Dim cbcs As CommandBarControls
Set cbcs = Application.CommandBars("Menu Bar").Controls("File").Controls
For icbc = 1 To cbcs.Count
MsgBox cbcs(icbc).Caption & " = " & cbcs(icbc).ID
Next icbc
End Sub
does not work with Outlook 2003 nor with Excel 2003
Perfect with Word 2003 and PowerPoint 2003
 
S

Sue Mosher [MVP-Outlook]

When in doubt, check the object browser: Press ALt+F11 to open the VBA
environment in Outlook, then press F2. Switch from <All Libraries> to
Outlook to browse all Outlook objects and their properties, methods, and
events.

You'll quickly see that in Outlook, which has two different kinds of
windows, CommandBars is a property not of the Application object, but the
Explorer and Inspector objects that represent those windows.
 
T

Tim Bolton

I have followed you instructions from above. I am trying to determine
the ID number of the Format button and or the ID numbers of Format -
HTML / Rich Text so that I can disable the option to choose this when
the user replies or sends a new e-mail.

The values that I am getting are - Const mfHTML = 2 and Const mfRTF = 3.
I have added these into the ADM via Group Policy, but the "Format"
button is still available when the user replies or sends a new e-mail.

Thanks!

Example of what I am trying to complete -

http://office.microsoft.com/en-us/assistance/HA011402401033.aspx


Tim Bolton




*** Sent via Developersdex http://www.developersdex.com ***
 

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