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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

"From" field extraction



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 7th 07, 12:04 AM posted to microsoft.public.outlook.program_vba
DG
external usenet poster
 
Posts: 31
Default "From" field extraction

In Outlook 2003, is it possible to programmatically read the "From" field of
a MailItem BEFORE the e-mail is sent out?
I've written a new "Send" utility and I noticed that the From field
properties are not visible until after the e-mail has been sent. I've tried
saving it in Exchange to the Drafts folder, I've tried saving it to the C:\
drive as a MSG file, but nothing. "From" is simply NULL.

Any ideas?
Thanks,
Doug
  #2  
Old April 8th 07, 01:21 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default "From" field extraction

In theory, yes. If the user has not explicitly set the Account drop down
prior to clicking Send, it will be the same as Namespace.CurrentUser.
Otherwise you can read a couple of named propeties using MAPI (C++/Delphi),
then use the IOlkAccountManager to find the corresponding account and read
the name and address of that account.
Outlook 2007 exposes the account used to send the message through the
MailItem.SendUsingAccount property.
plug Redemption exposes RDOMail.Account property (works in Outlook 2002
and up) - see http://www.dimastr.com/redemption/rd...htm#properties
and http://www.dimastr.com/redemption/rdo/RDOAccount.htm /plug

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

"DG" wrote in message
...
In Outlook 2003, is it possible to programmatically read the "From" field
of
a MailItem BEFORE the e-mail is sent out?
I've written a new "Send" utility and I noticed that the From field
properties are not visible until after the e-mail has been sent. I've
tried
saving it in Exchange to the Drafts folder, I've tried saving it to the
C:\
drive as a MSG file, but nothing. "From" is simply NULL.

Any ideas?
Thanks,
Doug



  #3  
Old April 8th 07, 05:28 AM posted to microsoft.public.outlook.program_vba
DG
external usenet poster
 
Posts: 31
Default "From" field extraction

Thank you Dmitry! That should get me in the right direction.

"Dmitry Streblechenko" wrote:

In theory, yes. If the user has not explicitly set the Account drop down
prior to clicking Send, it will be the same as Namespace.CurrentUser.
Otherwise you can read a couple of named propeties using MAPI (C++/Delphi),
then use the IOlkAccountManager to find the corresponding account and read
the name and address of that account.
Outlook 2007 exposes the account used to send the message through the
MailItem.SendUsingAccount property.
plug Redemption exposes RDOMail.Account property (works in Outlook 2002
and up) - see http://www.dimastr.com/redemption/rd...htm#properties
and http://www.dimastr.com/redemption/rdo/RDOAccount.htm /plug

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

"DG" wrote in message
...
In Outlook 2003, is it possible to programmatically read the "From" field
of
a MailItem BEFORE the e-mail is sent out?
I've written a new "Send" utility and I noticed that the From field
properties are not visible until after the e-mail has been sent. I've
tried
saving it in Exchange to the Drafts folder, I've tried saving it to the
C:\
drive as a MSG file, but nothing. "From" is simply NULL.

Any ideas?
Thanks,
Doug




 




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
Insert "subject" into the "first name" field of contact Luc Outlook - Using Forms 1 July 19th 06 11:31 PM
How to set holidays as "Out of office" in "Show time as" field? TFS Outlook - Calandaring 0 May 22nd 06 04:40 PM
DO NOT include field "Title" in the name column in "To" search Rob G. Outlook - Using Contacts 7 May 3rd 06 09:47 PM
Removing unwanted "Auto Complete" addresses from the "To:" field? Pilgrim Outlook - General Queries 1 May 1st 06 08:15 PM
"Percent" field changed to "Number" field Vaughan Outlook - Using Forms 1 March 14th 06 02:32 PM


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


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.