C
Cyril Tiwari
I've created an outlook 2002 add-in which adds a new button to the
standard command bar.
I want to write a method (vb.net) that will cause a msgBox to pop-up
and display the contents of the e-mail subject of the selected outlook
e-mail item.
The code below doesn't work. It compiles, but, when I click on the
button, nothing happens. Any help would be greatly appreciated.
-----------------------------------------------------------------------
Private Sub MyButton_Click(ByVal Ctrl As
Microsoft.Office.Core.CommandBarButton, ByRef CancelDefault As
Boolean) Handles MyButton.Click
Dim oMsg As Outlook.MailItem
Dim oApp As New Outlook.Application()
oMsg = oApp.ActiveExplorer.Selection(0)
MsgBox(oMsg.Body)
End Sub
------------------------------------------------------------------------
standard command bar.
I want to write a method (vb.net) that will cause a msgBox to pop-up
and display the contents of the e-mail subject of the selected outlook
e-mail item.
The code below doesn't work. It compiles, but, when I click on the
button, nothing happens. Any help would be greatly appreciated.
-----------------------------------------------------------------------
Private Sub MyButton_Click(ByVal Ctrl As
Microsoft.Office.Core.CommandBarButton, ByRef CancelDefault As
Boolean) Handles MyButton.Click
Dim oMsg As Outlook.MailItem
Dim oApp As New Outlook.Application()
oMsg = oApp.ActiveExplorer.Selection(0)
MsgBox(oMsg.Body)
End Sub
------------------------------------------------------------------------