Sent Items

  • Thread starter Thread starter Goran Stjepanovic
  • Start date Start date
G

Goran Stjepanovic

Hello,

Outlook 2002/2003
I would like to keep sent messages in corresponding mailboxes, as I open my
private mailbox ([email protected] ) and additional mailbox (
(e-mail address removed) ).
Whenever I send mail from (e-mail address removed) sent mail is placed in my private
Sent Items forlder, how to keep it in (e-mail address removed) Sent Items folder?

Anybody who have any examples on how to accomplish this using VBA, I need to
deploy solution on about 30 computers.

Thanx
 
You would have to use code to move the item to the other mailbox. Using VBA
code isn't the best way to do a deployment. Far better is creating an
Outlook COM addin, which is easier to deploy and won't overwrite the users
macros.

See http://www.outlookcode.com/d/code/zaphtml.htm#cw for an example of an
ItemAdd handler for the Inbox's Items collection. You would modify that code
to handle items added to the Sent Items folder instead of the Inbox. At a
module level you would get the alternate mailbox using the
NameSpace.GetSharedDefaultFolder method and use that object as the target
for your move.

In the ItemAdd code you would then use code like this:
Dim oMail As Outlook.MailItem
Set oMail = Item.Move(objAlternateFolder)
where objAlternateFolder is the other Sent Items folder.

In the code before you moved the item you would test to see which account
sent the item.
 
Back
Top