C
cGFyZXNo
Hi,
I have wrtten Outlook COM Add-in. The attached code on startup creates the
button on outlook tool bar and assign the icon C:\local\cat.bmp. Could anyone
please tell me how could I make my Add-in independent of C:\local\cat.bmp? I
mean can I put picture somewhere in add-in itself so that while installing on
other machine it should have any problem if C:\local\cat.bmp is not there. OR
How could I use any system icon?
Set moCBMeow =
moApp.ActiveExplorer.CommandBars.Item("Standard").FindControl(, , "890",
False, True)
If TypeName(moCBMeow) = "Nothing" Then
Set moCBMeow =
moApp.ActiveExplorer.CommandBars.Item("Standard").Controls.Add(msoControlButton, , "890", , True)
End If
With moCBMeow
> BeginGroup = True
> Caption = "Copylink"
> DescriptionText = "Meow meow meow"
> Enabled = True
> OnAction = "!<CopyLinkTestingAddin.Connect>"
Clipboard.Clear
Clipboard.SetData LoadPicture("c:\local\cat.bmp")
> PasteFace
> Style = msoButtonIconAndCaption
> Tag = "890"
> ToolTipText = "Meow meow meow"
> Visible = True
End With
Thanks.
Paresh
I have wrtten Outlook COM Add-in. The attached code on startup creates the
button on outlook tool bar and assign the icon C:\local\cat.bmp. Could anyone
please tell me how could I make my Add-in independent of C:\local\cat.bmp? I
mean can I put picture somewhere in add-in itself so that while installing on
other machine it should have any problem if C:\local\cat.bmp is not there. OR
How could I use any system icon?
Set moCBMeow =
moApp.ActiveExplorer.CommandBars.Item("Standard").FindControl(, , "890",
False, True)
If TypeName(moCBMeow) = "Nothing" Then
Set moCBMeow =
moApp.ActiveExplorer.CommandBars.Item("Standard").Controls.Add(msoControlButton, , "890", , True)
End If
With moCBMeow
> BeginGroup = True
> Caption = "Copylink"
> DescriptionText = "Meow meow meow"
> Enabled = True
> OnAction = "!<CopyLinkTestingAddin.Connect>"
Clipboard.Clear
Clipboard.SetData LoadPicture("c:\local\cat.bmp")
> PasteFace
> Style = msoButtonIconAndCaption
> Tag = "890"
> ToolTipText = "Meow meow meow"
> Visible = True
End With
Thanks.
Paresh