Clone mailitem

Status
Not open for further replies.
R

Ramazan

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

"Ramazan" <ramazangirgin@gmail.com> wrote in message

news:bf536c57-3d41-4585-a756-5d7067d01cc1@y6g2000prf.googlegroups.com...
> 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
 
On Apr 28, 4:22 pm, "
<kenslo...@mvps.org> 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.

> >

> http://www.slovaktech.com

> "Ramazan" <ramazangir...@gmail.com> wrote in message

> news:bf536c57-3d41-4585-a756-5d7067d01cc1@y6g2000prf.googlegroups.com...
>
> > 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?
 
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.

"Ramazan" <ramazangirgin@gmail.com> wrote in message

news:6fc17f0e-1fa2-436f-9120-0337a95e37a8@b6g2000pre.googlegroups.com...

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

> >

>

> "Ramazan" <ramazangirgin@gmail.com> wrote in message
> news:6fc17f0e-1fa2-436f-9120-0337a95e37a8@b6g2000pre.googlegroups.com...
> <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?


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

"ds2k7" <ds2k7> wrote in message

news:20BA388C-4DD9-441D-90C6-32609C3EE9E8@microsoft.com...
> 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?
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P MailItem.To Property with VBA not work Outlook VBA and Custom Forms 2
G Event when creating task from mailitem Outlook VBA and Custom Forms 2
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
U Outbox Message Stuck after reading some MailItem Properties with VBA Outlook VBA and Custom Forms 1
oliv- Best practice for catching mailitem.events Outlook VBA and Custom Forms 0
oliv- How to select an mailitem in explorer with "show as conversation" Outlook VBA and Custom Forms 8
JorgeDario How to capture and save the text, when responding a MailItem? Outlook VBA and Custom Forms 3
JorgeDario how to check a MailItem has a digital signature (SMIME) with vba? Outlook VBA and Custom Forms 1
JorgeDario ¿What property of mailitem can be used like primary key? Outlook VBA and Custom Forms 6
S Outlook VBA rule script to process both MailItem and MeetingItem Using Outlook 0
B right click outlook objects in OL2010 acts on current inbox mailitem Using Outlook 6
C MailItem Find method doesn't work Using Outlook 0
C MailItem.SaveAs not working Outlook VBA and Custom Forms 10
G RE:The signature is also inserted if you touch the MailItem. Outlook VBA and Custom Forms 1
B Add signature to MailItem Outlook VBA and Custom Forms 3
C How can I create a new MailItem inside a user folder? Outlook VBA and Custom Forms 4
S Create a new Outlook MailItem in an Outlook folder(not a draft) Outlook VBA and Custom Forms 2
A How to get OOM MailItem Raw data Outlook VBA and Custom Forms 2
S Saved Property of MailItem is copied Outlook VBA and Custom Forms 1
S MailItem Find Method question Outlook VBA and Custom Forms 6
N Getting the attachments in MailItem Outlook VBA and Custom Forms 1
T How to get MailItem.Body without security warning in Outlook 2010 Outlook VBA and Custom Forms 2
S ->[O2007] Parsing each line of a MailItem HTMLBody? Outlook VBA and Custom Forms 2
T How to get Inspector or MailItem from wordEditor Outlook VBA and Custom Forms 6
A Select the position of an attached file in a HTML mailitem Outlook VBA and Custom Forms 1
M MailItem object has no property for when a reply was sent Outlook VBA and Custom Forms 3
B Insert information to MailItem Outlook VBA and Custom Forms 1
E Properties added to MailItem in ItemSend event visible to recipien Outlook VBA and Custom Forms 1
V Setting HTMLBody of new mailItem Outlook VBA and Custom Forms 1
V How to find mailitem in the inspector is a brand new one Outlook VBA and Custom Forms 2
M Activate "Add digital signature to this massage" on a MailItem? Outlook VBA and Custom Forms 1
K importing EML in MailItem Outlook VBA and Custom Forms 1
A mailitem Send issue Outlook VBA and Custom Forms 5
M Get email address from MailItem.To? Outlook VBA and Custom Forms 6
S UserProperties of MailItem object. Outlook VBA and Custom Forms 3
R How to capture a Mailitem Event Outlook VBA and Custom Forms 3
S get current position in message body of mailitem Outlook VBA and Custom Forms 8
S How to get RFC822 format message from the MailItem object. Outlook VBA and Custom Forms 4
J Toolbar button to process current mailitem Outlook VBA and Custom Forms 1
D MailItem from an RSS feed Outlook VBA and Custom Forms 2
J Outlook 2007 crashed when pushing send on a displayed mailitem Outlook VBA and Custom Forms 1
N Memory with MailItem.Send Outlook VBA and Custom Forms 1
P Adding a button in a mailitem Outlook VBA and Custom Forms 1
S Reading mailitem after mail is send give runtime error. Outlook VBA and Custom Forms 1
D Max. length of MSO MailItem.EntryID Outlook VBA and Custom Forms 6
R MailItem.Display() error Outlook VBA and Custom Forms 1
R MailItem Outlook VBA and Custom Forms 2
D Length of the MailItem.EntryID Outlook VBA and Custom Forms 2
M What is the recommendet way to read/write a user defined Field (Named Property) in the MailItem Obje Outlook VBA and Custom Forms 1
M What is the recommendet way to read/write a user defined Field (Named Property) in the MailItem Obje Outlook VBA and Custom Forms 5

Similar threads

Back
Top