Icons in menu 
Author Message
 Icons in menu

Hallo NG,

i create a menu with VBA
How can i put own icons in the menu?

mfg
Jens

Code:

Private Sub CreateMenus()
    With m_outlookApp.ActiveExplorer.CommandBars("Tools").Controls.Add
(msoControlPopup, , , , True)
        .Caption = "Attachments"
        .Tag = "Att"
        .BeginGroup = True
        .Enabled = True
        .Visible = True

        Set btnConfig = .Controls.Add(msoControlButton, , , , True)
        With btnConfig
            .Caption = "Configuration"
            .Enabled = True
            .Visible = True
            .FaceId = 59
            .ToolTipText = "Ruft das Configurations Formular auf"
        End With

        Set btnExport = .Controls.Add(msoControlButton, , , , True)
        With btnExport
            .Caption = "Import/Export"
            .Enabled = True
            .Visible = True
            .ToolTipText = "Importieren / Exportieren"
        End With

        Set btnAct = .Controls.Add(msoControlButton, , , , True)
        With btnAct
            .Caption = "Aktiv"
            .State = msoButtonDown
            .Enabled = True
            .ToolTipText = "Aktiviert das Programm"
            .Visible = True
        End With
    End With
End Sub



Sun, 30 Jan 2005 15:19:38 GMT  
 Icons in menu
Copy your custom bitmap to the clipboard, then call CommandBarButton.PasteFace.
In Outlook 2002 you can also set the Picture property.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool


Quote:
> Hallo NG,

> i create a menu with vba
> How can i put own icons in the menu?

> mfg
> Jens

> Code:

> Private Sub CreateMenus()
>     With m_outlookApp.ActiveExplorer.CommandBars("Tools").Controls.Add
> (msoControlPopup, , , , True)
>         .Caption = "Attachments"
>         .Tag = "Att"
>         .BeginGroup = True
>         .Enabled = True
>         .Visible = True

>         Set btnConfig = .Controls.Add(msoControlButton, , , , True)
>         With btnConfig
>             .Caption = "Configuration"
>             .Enabled = True
>             .Visible = True
>             .FaceId = 59
>             .ToolTipText = "Ruft das Configurations Formular auf"
>         End With

>         Set btnExport = .Controls.Add(msoControlButton, , , , True)
>         With btnExport
>             .Caption = "Import/Export"
>             .Enabled = True
>             .Visible = True
>             .ToolTipText = "Importieren / Exportieren"
>         End With

>         Set btnAct = .Controls.Add(msoControlButton, , , , True)
>         With btnAct
>             .Caption = "Aktiv"
>             .State = msoButtonDown
>             .Enabled = True
>             .ToolTipText = "Aktiviert das Programm"
>             .Visible = True
>         End With
>     End With
> End Sub



Mon, 31 Jan 2005 00:53:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Icons on Menus and Extract Icons from Files?Message-ID: <3f

2. Icons, and Menu Items on the Start Menu.

3. Can I add icon to menu.

4. Adding custom icons to menus from macro?

5. displaying icons in menus

6. icons in menus?

7. Icons on menus

8. Providing icons to menus and submenus

9. icon context menu

10. Icons in Menus

11. Anyway to set an Icon to menu item?

12. Icons in menus?

 

 
Powered by phpBB® Forum Software