 |
|
|
|
| Author |
Message |
Catalin
Joined: 15 Aug 2007 Posts: 4
|
Posted: Fri Jan 11, 2008 3:52 pm Post subject: ItemSend Event |
|
|
Dear Friends,
I have the following question:
I use OL2003 and have 3 email accounts. What I need to do is to move the
sent email to a subfolde based on the account I am using. Is this possible
with ItemSend Event or there is any other solution? How can I determine the
email account used when sending emails?
Pls help.
Thanks in advance.
Catalin
Archived from group: microsoft>public>outlook>program_vba |
|
| Back to top |
|
 |
Eric Legault [MVP - Outlo
Joined: 12 Aug 2007 Posts: 60
|
Posted: Fri Jan 11, 2008 4:52 pm Post subject: RE: ItemSend Event |
|
|
From what I remember you can't really determine the sending account during
ItemSend - that information is stamped into the e-mail after any trappable
events have been fired. Regardless, the best approach is to monitor the
ItemAdd event for the Sent Items folder to hook into that message when it is
first saved there after it is sent - then you can look at the
SenderEmailAddress property for that message to determine which account it is
associated with and move it to the desired folder.
--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/
"Catalin" wrote:
> Dear Friends,
>
> I have the following question:
>
> I use OL2003 and have 3 email accounts. What I need to do is to move the
> sent email to a subfolde based on the account I am using. Is this possible
> with ItemSend Event or there is any other solution? How can I determine the
> email account used when sending emails?
>
> Pls help.
>
> Thanks in advance.
> Catalin
> |
|
| Back to top |
|
 |
Catalin
Joined: 15 Aug 2007 Posts: 4
|
Posted: Sat Jan 12, 2008 5:04 am Post subject: RE: ItemSend Event |
|
|
Thanks a lot for your answer.
But pls tell me how do I capture the ItemAdd event since is nothing like
this in ThisOutlookSession? Can u help me?
Regards,
Catalin
"Eric Legault [MVP - Outlook]" wrote:
> From what I remember you can't really determine the sending account during
> ItemSend - that information is stamped into the e-mail after any trappable
> events have been fired. Regardless, the best approach is to monitor the
> ItemAdd event for the Sent Items folder to hook into that message when it is
> first saved there after it is sent - then you can look at the
> SenderEmailAddress property for that message to determine which account it is
> associated with and move it to the desired folder.
>
> --
> Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
> Try Picture Attachments Wizard for Outlook:
> http://www.collaborativeinnovations.ca
> Blog: http://blogs.officezealot.com/legault/
>
>
> "Catalin" wrote:
>
> > Dear Friends,
> >
> > I have the following question:
> >
> > I use OL2003 and have 3 email accounts. What I need to do is to move the
> > sent email to a subfolde based on the account I am using. Is this possible
> > with ItemSend Event or there is any other solution? How can I determine the
> > email account used when sending emails?
> >
> > Pls help.
> >
> > Thanks in advance.
> > Catalin
> > |
|
| Back to top |
|
 |
Sue Mosher [MVP-Outlook]
Joined: 12 Aug 2007 Posts: 656
|
Posted: Mon Jan 14, 2008 4:40 pm Post subject: Re: ItemSend Event |
|
|
See http://www.outlook-code.com/article.aspx?id=62 for an example.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Catalin" wrote in message @microsoft.com...
> Thanks a lot for your answer.
> But pls tell me how do I capture the ItemAdd event since is nothing like
> this in ThisOutlookSession? Can u help me?
>
> Regards,
> Catalin
>
> "Eric Legault [MVP - Outlook]" wrote:
>
>> From what I remember you can't really determine the sending account during
>> ItemSend - that information is stamped into the e-mail after any trappable
>> events have been fired. Regardless, the best approach is to monitor the
>> ItemAdd event for the Sent Items folder to hook into that message when it is
>> first saved there after it is sent - then you can look at the
>> SenderEmailAddress property for that message to determine which account it is
>> associated with and move it to the desired folder.
>>
>> --
>> Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
>> Try Picture Attachments Wizard for Outlook:
>> http://www.collaborativeinnovations.ca
>> Blog: http://blogs.officezealot.com/legault/
>>
>>
>> "Catalin" wrote:
>>
>> > Dear Friends,
>> >
>> > I have the following question:
>> >
>> > I use OL2003 and have 3 email accounts. What I need to do is to move the
>> > sent email to a subfolde based on the account I am using. Is this possible
>> > with ItemSend Event or there is any other solution? How can I determine the
>> > email account used when sending emails?
>> >
>> > Pls help.
>> >
>> > Thanks in advance.
>> > Catalin
>> > |
|
| Back to top |
|
 |
Catalin
Joined: 15 Aug 2007 Posts: 4
|
Posted: Thu Jan 17, 2008 4:17 pm Post subject: Re: ItemSend Event |
|
|
Thank you very much
It was very helpful.
"Sue Mosher [MVP-Outlook]" wrote:
> See http://www.outlook-code.com/article.aspx?id=62 for an example.
>
> --
> Sue Mosher, Outlook MVP
> Author of Microsoft Outlook 2007 Programming:
> Jumpstart for Power Users and Administrators
> http://www.outlookcode.com/article.aspx?id=54
>
>
> "Catalin" wrote in message @microsoft.com...
> > Thanks a lot for your answer.
> > But pls tell me how do I capture the ItemAdd event since is nothing like
> > this in ThisOutlookSession? Can u help me?
> >
> > Regards,
> > Catalin
> >
> > "Eric Legault [MVP - Outlook]" wrote:
> >
> >> From what I remember you can't really determine the sending account during
> >> ItemSend - that information is stamped into the e-mail after any trappable
> >> events have been fired. Regardless, the best approach is to monitor the
> >> ItemAdd event for the Sent Items folder to hook into that message when it is
> >> first saved there after it is sent - then you can look at the
> >> SenderEmailAddress property for that message to determine which account it is
> >> associated with and move it to the desired folder.
> >>
> >> --
> >> Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
> >> Try Picture Attachments Wizard for Outlook:
> >> http://www.collaborativeinnovations.ca
> >> Blog: http://blogs.officezealot.com/legault/
> >>
> >>
> >> "Catalin" wrote:
> >>
> >> > Dear Friends,
> >> >
> >> > I have the following question:
> >> >
> >> > I use OL2003 and have 3 email accounts. What I need to do is to move the
> >> > sent email to a subfolde based on the account I am using. Is this possible
> >> > with ItemSend Event or there is any other solution? How can I determine the
> >> > email account used when sending emails?
> >> >
> >> > Pls help.
> >> >
> >> > Thanks in advance.
> >> > Catalin
> >> >
>
|
|
| Back to top |
|
 |
|
|
| Related Topics: | Calendar Event Hello All, I'm trying to do the following: I want to be able to trap a new appointment BEFORE it gets saved (after user selects save). The point is to be able to add some logic to what can go in a calendar. The Outlook object model doesn't appear to have
Appointment in Calendar help - Event triggers - Visual basic I've added an event handler to trigger when a new appointment is added into my calendar. This works. However, when a new appointment is viewed in a preview pane in an inbox folder, this event is also triggered as Outlook appears to move a 'tentative' appo
Prevent an event loop when saving Task item in event handler I'm using the event handler code below to modify the Subject of a Task whenever I manually change its Due Date. The Save method in the code triggers another ItemChange event. I use a boolean public variable to avoid an event loop (examples in VBA help d
BeforeDelete Event Hi everybody, I want to execute some code before a contact item will be deleted. This is my code: Sub MsgBox "Test" End Sub But it doesn't function, because there is no message box. Why? Regards Daniel
newmail event Hello, How to recognise and get object (mailitem) when newmail event occurs ? Pawel |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|