I have a small problem I just can't seem to find an answer to. I have an application that needs to have the ability to drag and drop emails into it. Information from the email is going to be stored. I have a working test, minus late binding. We have three versions of Outlook currently being used in my company so I need late binding for this drag and drop process.
Below is my code from my test form. This is using early binding to Outlook 2007. I am looking for help in converting this to late binding. If you can help - and even if you have some good references you can give me to read and figure this out - thanks.
=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
Below is my code from my test form. This is using early binding to Outlook 2007. I am looking for help in converting this to late binding. If you can help - and even if you have some good references you can give me to read and figure this out - thanks.
Code:
Dim outlook As Outlook.Application = Nothing
Dim mail As Outlook.MailItem = Nothing
Try
outlook = DirectCast(Microsoft.VisualBasic.Interaction.GetObject("", "Outlook.Application"), Outlook.Application)
Dim explorer As Outlook.Explorer = outlook.ActiveExplorer
mail = DirectCast(explorer.Selection.Item(1), Outlook.MailItem)
Catch ex As Exception
MessageBox.Show("Error - Mail Item Not Found!", "Not Found")
End Try
MessageBox.Show(mail.To.ToString, "To")
MessageBox.Show(mail.Subject, "Subject")
MessageBox.Show(mail.Body, "Body")
=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer