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

Move mails from Exchange server inbox to pst inbox



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 14th 07, 07:14 AM posted to microsoft.public.outlook.program_vba
Jeena
external usenet poster
 
Posts: 1
Default Move mails from Exchange server inbox to pst inbox

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......
  #2  
Old December 14th 07, 02:28 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Move mails from Exchange server inbox to pst inbox

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
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Jeena" wrote in message ...
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......

 




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
How can I speed up the updation of my inbox with exchange server? Argha Outlook and VBA 0 December 5th 07 06:56 AM
Mails not appearing in Inbox although on Server and viewable by colleague [email protected] Outlook - General Queries 6 February 20th 07 09:15 AM
How do I move mail from imap to exchange inbox? Chrish01 Outlook - Installation 1 October 12th 06 07:08 PM
Outlook 2007-exchange issue..inbox doesn't show new mails when offline! Sumit Outlook - General Queries 0 June 8th 06 08:18 AM
Inbox wont synch with exchange server Pat Coleman Outlook - General Queries 1 February 1st 06 03:02 PM


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