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

Getting from field value



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 26th 06, 09:57 PM posted to microsoft.public.outlook.program_vba
Jani Lehti
external usenet poster
 
Posts: 1
Default Getting from field value

Is there a way I can get the From field value, when I send the email?

using the ItemSend when i send the email, i can check the to, subject etc.
using Item.To, Item.Subject etc. but I can't read the From value. I would
need to check if that's empty (like normally when sending from my mailbox) or
if it has something in it (normally when I send email from resource mailbox),
and based on which one, I run the code before it send the email.

Any way to check this?

Thanks!
Ads
  #2  
Old April 26th 06, 10:35 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Getting from field value

That's not filled in until the item is sent. It's filled in by the
transport. Before sending the only clues are undocumented properties you
have to read from the item using CDO 1.21 or Redemption or Extended MAPI
code. The Outlook object model won't help you with that.

--
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


"Jani Lehti" Jani wrote in message
news
Is there a way I can get the From field value, when I send the email?

using the ItemSend when i send the email, i can check the to, subject etc.
using Item.To, Item.Subject etc. but I can't read the From value. I would
need to check if that's empty (like normally when sending from my mailbox)
or
if it has something in it (normally when I send email from resource
mailbox),
and based on which one, I run the code before it send the email.

Any way to check this?

Thanks!


  #3  
Old April 26th 06, 10:45 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Getting from field value

The sending process is not finished until after that event completes. You'll
be better off choosing which account to use first with code, if your process
can accomodate such an action. See this for more info:

TIP: Fun with Outlook CommandBars:
http://www.outlookcode.com/d/tips/commandbarfun.htm

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Jani Lehti" wrote:

Is there a way I can get the From field value, when I send the email?

using the ItemSend when i send the email, i can check the to, subject etc.
using Item.To, Item.Subject etc. but I can't read the From value. I would
need to check if that's empty (like normally when sending from my mailbox) or
if it has something in it (normally when I send email from resource mailbox),
and based on which one, I run the code before it send the email.

Any way to check this?

Thanks!

 




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
My inbox displays the TO: field instead of the FROM: field. Dave Outlook - Installation 2 March 28th 08 07:46 AM
"Percent" field changed to "Number" field Vaughan Outlook - Using Forms 1 March 14th 06 02:32 PM
Adding Follow Up field to Field Chooser Programatically. c Outlook and VBA 3 February 25th 06 03:10 PM
Populate Company field from Contact field in custom task form Sue Mosher [MVP-Outlook] Outlook - Using Forms 0 January 20th 06 08:37 PM
rename 'User Field 1' field ? E-Double Outlook - Installation 1 January 16th 06 04:38 PM


All times are GMT +1. The time now is 07:02 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.