A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

SenderEmailAddress in VB.NET on Outlook 2003



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 9th 07, 11:24 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 1
Default SenderEmailAddress in VB.NET on Outlook 2003

I have an application in development that uses the VSTO 2005 libs to
create an addin to Outlook 2003. The application basically adds a
button to the New Mail Message window that, when clicked, sends
everything about the mail message to our server. One of the important
piece of information is the sender's email address.
This application cannot be deployed with either Redemption or CDO.
Is there a way to do this? Here is a snippet of the code I am writing

Dim mailMessage As Outlook.MailItem
Dim test as String
mailMessage = CType(myCurrentInspector.CurrentItem, Outlook.MailItem)

test = mailMessage.SenderEmailAddress

test is always nothing.
This is obviously a subset of the actual code, but am I missing
something?

  #2  
Old April 10th 07, 03:27 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default SenderEmailAddress in VB.NET on Outlook 2003

Is the open email message one that has been received? That's required for
any non-blank return value.

Your code works fine here, where are you calling it from? I put that code in
the Inspector.Activate() event handler. You should not try to run it in the
NewInspector event handler, where a weak object reference to Inspector
should not be used for much else than testing Inspector.CurrentItem.Class or
..MessageClass.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


wrote in message
oups.com...
I have an application in development that uses the VSTO 2005 libs to
create an addin to Outlook 2003. The application basically adds a
button to the New Mail Message window that, when clicked, sends
everything about the mail message to our server. One of the important
piece of information is the sender's email address.
This application cannot be deployed with either Redemption or CDO.
Is there a way to do this? Here is a snippet of the code I am writing

Dim mailMessage As Outlook.MailItem
Dim test as String
mailMessage = CType(myCurrentInspector.CurrentItem, Outlook.MailItem)

test = mailMessage.SenderEmailAddress

test is always nothing.
This is obviously a subset of the actual code, but am I missing
something?


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
View Outlook 2003/Exchange 2003 Private Items with Outlook 2007 [email protected] Outlook - Calandaring 0 February 19th 07 12:00 PM
(outlook 2003) office word 2003 wont be set as default editor Jason Outlook - General Queries 1 January 16th 07 04:37 AM
Outlook 2003: microsoft office outlook 2003 does not recognize fax numbers SteveMc Outlook - General Queries 4 December 20th 06 10:38 PM
Exchange 2003/Outlook 2003/Outlook 2007 combination creates duplicate folders [email protected] Outlook - General Queries 3 December 5th 06 04:32 PM
How to change read only SenderName and SenderEmailAddress [email protected] Outlook - General Queries 3 April 19th 06 07:22 PM


All times are GMT +1. The time now is 08:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.