B
Bob Smedley
I am creating a new command on Word's main Menu Bar with a bunch of sub menu
items below that. I want the sub menu items to be of the "Icon and Caption"
type. I have ICO files for each of the sub menu items. I cannot seem to find
out how to get the image from the ICO file to the sub menu item. Help would
be appreciated.
Here is my code so far...
Set MenuObject = Application.CommandBars("Menu Bar"). _
Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
MenuObject.Caption = "My Menu Bar Item"
Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton)
MenuItem.OnAction = "MyMacroName"
MenuItem.Caption = "This will eventually do something"
MenuItem.Style = msoButtonIconAndCaption
I know the PasteFace method is available but it depends upon the image
already being in the clipboard. Plus I would like the images to be part of
the DOT file rather than being files on the hard drive. I thought maybe
using an imagelist or image control on a hidden form but the problem is how
to get the image on to the clipboard.
Suggestions?
thanks
items below that. I want the sub menu items to be of the "Icon and Caption"
type. I have ICO files for each of the sub menu items. I cannot seem to find
out how to get the image from the ICO file to the sub menu item. Help would
be appreciated.
Here is my code so far...
Set MenuObject = Application.CommandBars("Menu Bar"). _
Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
MenuObject.Caption = "My Menu Bar Item"
Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton)
MenuItem.OnAction = "MyMacroName"
MenuItem.Caption = "This will eventually do something"
MenuItem.Style = msoButtonIconAndCaption
I know the PasteFace method is available but it depends upon the image
already being in the clipboard. Plus I would like the images to be part of
the DOT file rather than being files on the hard drive. I thought maybe
using an imagelist or image control on a hidden form but the problem is how
to get the image on to the clipboard.
Suggestions?
thanks