Move doesn't work on flagged messages....why?

  • Thread starter Thread starter cmarcus
  • Start date Start date
C

cmarcus

I wrote a macro to move a message or selection of messages to a
folder. The macro first gets the category of the message and then
moves the message to a folder of the same name as the category.
Everything works fine and dandy except for flagged messages. If a
message is flagged for follow up, or even if it has been flagged as
complete, the move fails. It doesn't give any error message either.
The macro executes as if nothing went wrong, but the message is still
sitting in the inbox.
The easy way around this would be to clear the flag before moving, but
I'd prefer to keep the flag for informational purposes.
Can anyone tell me why this doesn't work or if there's a work around?

Thanks in advance.
 
I'm not having any problems with OL2003; here's the code I was using:

Dim objMail As Outlook.MailItem
Dim objFolder As Outlook.MAPIFolder, objNS As Outlook.NameSpace

Set objNS = Application.GetNamespace("MAPI")
Set objFolder =
objNS.GetFolderFromID("0000000038F2773A1C598D49882D14EC0C5C40C30100BE3273CED
F641247930687DA270E17400000036B025A0000")

Set objMail = Application.ActiveExplorer.Selection(1)
objMail.Move objFolder
 
Back
Top