Thread: Clone mailitem
View Single Post
  #6  
Old May 13th 09, 02:59 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Clone mailitem

This is not the same thing as what this thread is discussing, please do not
hijack threads, start your own.

When an item is moved it's first copied to the new folder and then the
original item is deleted.

If your code gets the EntryID of movedItem and then closes and releases all
instances of your Inspector/MailItem objects and then uses the EntryID to
get the moved item as a new instance of a MailItem object you will not see
what you are seeing now. To release the existing instances set them to
Nothing.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"ds2k7" wrote in message
...
I'm having a similar issue, though not with the Clone function. I'm
starting
to think it's just the way Display works

My situation is as follows:

emails arrive in the inbox, and must be relocated to another folder
("Cabinet") as they are read. Since outlook has the tendancy to close the
email when moving it to another folder, I have written the following to
relocate the email, and then display it again:


Set objApp = Outlook.Application
Set objNS = Outlook.Application.GetNamespace("MAPI")
Set objItem = GetCurrentItem() 'some other working function
Set objFolder = objItem.Parent
Set MAPIFolderObject = objFolder.Parent
Set objFolder1 = MAPIFolderObject.Folders("Cabinet")
Set movedItem = objItem.Move(objFolder1)
movedItem.Display

now, when the email is originally opened, it is shown in read mode. From:
is
the sender's address, to: is my group's address, etc.

After running the macro, the mail is redisplayed in edit mode, from: is
the
sender's address, to: is my group's address. Only the Send button is
available, yet I would expect to be able to Reply.

Since I'm faily sure that's what this thread was getting at, any idea of
cause/resolution?


Ads