Move mails from Exchange server inbox to pst inbox

J

Jeena

hi,
i have a macro which runs for every new mail that is recieved. but this
happens on the exchanger server inbox using the newmail event. Once the macro
is run on the mail, i need to move the same mailitem to the pst inbox.

Could any1 help me with the same......
 
S

Sue Mosher [MVP-Outlook]

Add to your macro a statement like this:

theItem.Move theFolder

were theFolder is a MAPIFolder object representing the target folder. To get a non-default folder, you need to walk the folder hierarchy using the Folders collections or use a function that does that for you. See http://www.outlookcode.com/d/code/getfolder.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top