PC Review


Reply
Thread Tools Rate Thread

Retreiving the senders email address

 
 
=?Utf-8?B?UmFuamFuIGFzIHVzdWFs?=
Guest
Posts: n/a
 
      3rd May 2004
Dear folks,
I am creating a program in VB .net to access the email address of the sender from the microsoft outlook folder. I can access the subject line when I write the following piece of code, However I don't know how to access the email address property of the person sending the mail? I tried "sendername" property , but didnt' work! Any suggestions would be appreciated. My code is below , for retreiving the subject.

cheers,

Ranjan


Dim Objapp = CreateObject("outlook.application")
Dim objns = Objapp.GetNamespace("MAPI")
'Dim objfolder = objns.PickFolder
Dim strName As String

Dim objselection = Objapp.activeExplorer.selection
Dim objItem As Object


For Each objItem In objselection

TextBox1.Text = objItem.subject

loop




 
Reply With Quote
 
 
 
 
Dmitry Streblechenko \(MVP\)
Guest
Posts: n/a
 
      3rd May 2004
See http://www.outlookcode.com/d/code/getsenderaddy.htm

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Ranjan as usual" <(E-Mail Removed)> wrote in message
news:1EE63F8E-CEBB-4C3B-A689-(E-Mail Removed)...
> Dear folks,
> I am creating a program in VB .net to access the email address of the

sender from the microsoft outlook folder. I can access the subject line when
I write the following piece of code, However I don't know how to access the
email address property of the person sending the mail? I tried "sendername"
property , but didnt' work! Any suggestions would be appreciated. My code is
below , for retreiving the subject.
>
> cheers,
>
> Ranjan
>
>
> Dim Objapp = CreateObject("outlook.application")
> Dim objns = Objapp.GetNamespace("MAPI")
> 'Dim objfolder = objns.PickFolder
> Dim strName As String
>
> Dim objselection = Objapp.activeExplorer.selection
> Dim objItem As Object
>
>
> For Each objItem In objselection
>
> TextBox1.Text = objItem.subject
>
> loop
>
>
>
>



 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      3rd May 2004
In Outlook 2003, you can use the MailItem.SenderEmailAddress, but note that
it's subject to security prompts.

In earlier versions, there is no Outlook property that returns the sender's
email address. You can either use CDO (or Redemption to avoid security
prompts -- http://www.dimastr.com/redemption/) to get the From address or
use Outlook to get the Reply To address. Sample code at
http://www.outlookcode.com/d/code/getsenderaddy.htm


--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Ranjan as usual" <(E-Mail Removed)> wrote in message
news:1EE63F8E-CEBB-4C3B-A689-(E-Mail Removed)...
> Dear folks,
> I am creating a program in VB .net to access the email address of the

sender from the microsoft outlook folder. I can access the subject line when
I write the following piece of code, However I don't know how to access the
email address property of the person sending the mail? I tried "sendername"
property , but didnt' work! Any suggestions would be appreciated. My code is
below , for retreiving the subject.
>
> cheers,
>
> Ranjan
>
>
> Dim Objapp = CreateObject("outlook.application")
> Dim objns = Objapp.GetNamespace("MAPI")
> 'Dim objfolder = objns.PickFolder
> Dim strName As String
>
> Dim objselection = Objapp.activeExplorer.selection
> Dim objItem As Object
>
>
> For Each objItem In objselection
>
> TextBox1.Text = objItem.subject
>
> loop
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stop e/mail from senders in my blocked senders list from. =?Utf-8?B?U3R1YXJ0IEJlbGw=?= Microsoft Outlook Discussion 1 30th Sep 2004 01:58 PM
Re: Adding senders to blocked senders list Diane Poremsky [MVP] Microsoft Outlook Discussion 0 22nd Sep 2004 03:32 PM
Adding senders to blocked senders list =?Utf-8?B?cGlub3k=?= Microsoft Outlook Discussion 0 22nd Sep 2004 02:31 PM
Add Multiple Senders to Blocked Senders List Frances Microsoft Outlook 0 20th Jan 2004 01:19 AM
Rules - Outlook 2000 - 1. Multiple Senders' Names; 2. Multiple Senders' Addr. Joe Microsoft Outlook 0 19th Aug 2003 02:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:41 AM.