How to get Outlook mail body text using active window search in VB2005 express  
Author Message
kimhoskin





PostPosted: Visual Studio Tools for Office, How to get Outlook mail body text using active window search in VB2005 express Top

Hi,

I am struggling to find out how to do this:
How to get open/active Outlook mail body text into string using active window search(using the win32 api) in VB2005 express.

Has anyone seen or coded this kind of thing before

Cheers
Kim




Visual Studio Tools for Office18  
 
 
Sue Mosher - Outlook MVP





PostPosted: Visual Studio Tools for Office, How to get Outlook mail body text using active window search in VB2005 express Top

Why not use the Outlook object model Application.ActiveInspector.CurrentItem.Body

Please note that this is a forum for Visual Studio Tools for Office, not VB2005 Express. Also note the resources on the main forum listing where to go for Outlook programming questions.


 
 
Bruno Yu - MSFT





PostPosted: Visual Studio Tools for Office, How to get Outlook mail body text using active window search in VB2005 express Top

kimhoskin,

It depends on your project. If you are developing with the Office, the Microsoft.Office.Interop.Outlook will be fine. Just pay more attention there are several methods of this namespace, such as Application, Explorer, Inspector, MAPIFolder, MailItem.

However, when you develop your project with System namespace, the track will be System.Web.Mail in .NET 1.1 and System.Net namespace with the following methods: SmtpClient, MailMessage.

Please choose the right track you are looking up.