Moving Invites and messages with same macro

E

expect_ed

Right now I have a bunch of ALT keys set up with toolbar macros to move my
various emails into project folders (OL '03). Only problem is it does not
work with accepted calendar invites. Here is a sample of my code:

Dim msg As MailItem

For Each msg In ActiveExplorer.Selection
msg.Move _
GetNamespace("MAPI").Folders("ACTIVE
Archive").Folders("Projects").Folders("Client Billing")
Next 'msg

Set msg = Nothing

Can anyone suggest how to modify this so it will also move invites if they
are among the selected items?

Thanks in advance for your help!
ed
 
M

Michael Bauer [MVP - Outlook]

You may declare msg as Object so it can handle MailItems and MeetingItems,
else you get a Type Mismatch error.

The next time, please post to *.outlook.program_vba for programming related
issues.

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool:
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Wed, 11 Jun 2008 09:05:00 -0700 schrieb expect_ed:
 
E

expect_ed

Worked like a charm.
Thanks for the help
ed

Michael Bauer said:
You may declare msg as Object so it can handle MailItems and MeetingItems,
else you get a Type Mismatch error.

The next time, please post to *.outlook.program_vba for programming related
issues.

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool:
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Wed, 11 Jun 2008 09:05:00 -0700 schrieb expect_ed:
 

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