I need to add a button to the 'New Message' and 'Inbox Message' Standard Toolbar. In other words, my button should be on the Standard Toolbar each time a user composes a new message or opens mail from his Inbox. I used the following code:
Set app = Outlook.Application
Set NewTask = app.CreateItem(olMailItem)
Set MyBar = NewTask.GetInspector.CommandBars.Item("STANDARD")
NewTask.Display
Set oMyCB = MyBar.Controls.Add(msoControlButton, , , , False)
NewTask.Close olDiscard
This worked for 'New Message' window. However, when I open mail from the Inbox Folder and click on the same button, nothing happens.
Would greatly appreciate any assistance


Reply With Quote