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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Clone mailitem



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 28th 09, 08:52 AM posted to microsoft.public.outlook.program_addins
Ramazan
external usenet poster
 
Posts: 24
Default Clone mailitem

Hi all,
I want to clone mail item. When i use Copy() method for mailitem in
inbox folder and call Display() method there is a Send button. But it
must be reply,forward and reply all buttons. I think Copy() method
copies some of properties like Subject,To,Body...

How can i clone with all properties?
Thanks in advance.
Ramazan
Ads
  #2  
Old April 28th 09, 02:22 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Clone mailitem

Copy() should copy just about all the properties from an original item. Of
course things like EntryID will be different. If there are any properties
you don't see on the copy from the original then you must copy them over
yourself.

--
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


"Ramazan" wrote in message
...
Hi all,
I want to clone mail item. When i use Copy() method for mailitem in
inbox folder and call Display() method there is a Send button. But it
must be reply,forward and reply all buttons. I think Copy() method
copies some of properties like Subject,To,Body...

How can i clone with all properties?
Thanks in advance.
Ramazan


  #3  
Old April 29th 09, 07:38 AM posted to microsoft.public.outlook.program_addins
Ramazan
external usenet poster
 
Posts: 24
Default Clone mailitem

On Apr 28, 4:22 pm, "Ken Slovak - [MVP - Outlook]"
wrote:
Copy() should copy just about all the properties from an original item. Of
course things like EntryID will be different. If there are any properties
you don't see on the copy from the original then you must copy them over
yourself.

--
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

"Ramazan" wrote in message

...

Hi all,
I want to clone mail item. When i use Copy() method for mailitem in
inbox folder and call Display() method there is a Send button. But it
must be reply,forward and reply all buttons. I think Copy() method
copies some of properties like Subject,To,Body...


How can i clone with all properties?
Thanks in advance.
Ramazan



I understand this, It is not related to copy. I call Copy() method
and contruct new mail and call Display() method . I can't see
Reply,forward and reply all buttons. It says that "Message is not
send". I can onlu show Send button.
But when i double click on new constructed mail and open it, on
inspector i can see Reply,forward and reply all buttons.
I can't understand where is the problem .
I will try call in thread mailitem display method after wait a 1-2
minute. Because i'm doing all of this activities in OnOpen() method. I
will try after return OnOpen()
Do you have any idea?
  #4  
Old April 29th 09, 02:42 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Clone mailitem

Well obviously if you create a new, unsent message it will be unsent and
won't have the Reply, ReplyAll or Forward buttons. No new mail does.

I don't care if you double-click to open a new item or not, if it was never
sent it shouldn't have those buttons. If you are seeing something else then
you aren't explaining what you actually are seeing, or your Outlook is
really messed up.

--
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


"Ramazan" wrote in message
...
snip
I understand this, It is not related to copy. I call Copy() method
and contruct new mail and call Display() method . I can't see
Reply,forward and reply all buttons. It says that "Message is not
send". I can onlu show Send button.
But when i double click on new constructed mail and open it, on
inspector i can see Reply,forward and reply all buttons.
I can't understand where is the problem .
I will try call in thread mailitem display method after wait a 1-2
minute. Because i'm doing all of this activities in OnOpen() method. I
will try after return OnOpen()
Do you have any idea?


  #5  
Old May 13th 09, 06:22 AM posted to microsoft.public.outlook.program_addins
ds2k7
external usenet poster
 
Posts: 1
Default Clone mailitem

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?


"Ken Slovak - [MVP - Outlook]" wrote:

Well obviously if you create a new, unsent message it will be unsent and
won't have the Reply, ReplyAll or Forward buttons. No new mail does.

I don't care if you double-click to open a new item or not, if it was never
sent it shouldn't have those buttons. If you are seeing something else then
you aren't explaining what you actually are seeing, or your Outlook is
really messed up.

--
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


"Ramazan" wrote in message
...
snip
I understand this, It is not related to copy. I call Copy() method
and contruct new mail and call Display() method . I can't see
Reply,forward and reply all buttons. It says that "Message is not
send". I can onlu show Send button.
But when i double click on new constructed mail and open it, on
inspector i can see Reply,forward and reply all buttons.
I can't understand where is the problem .
I will try call in thread mailitem display method after wait a 1-2
minute. Because i'm doing all of this activities in OnOpen() method. I
will try after return OnOpen()
Do you have any idea?



  #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?


 




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 to clone backup style of all Outlook 2K settings to one folder David F Outlook - Installation 5 February 19th 07 08:01 PM
A complete relocate/clone backup for Outlook 2000 as Tom Koch presents for OE? David F Outlook Express 1 February 19th 07 01:47 AM
'Backup and Restore Clone...' - registry keys... Roy Hammond Outlook Express 9 October 22nd 06 12:45 AM
How do I clone an appointment? jancan Outlook - Calandaring 3 May 31st 06 08:19 AM
How can I create a MailItem that displays like a received MailItem ? Clive Outlook - Using Forms 0 February 27th 06 04:14 PM


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