C
covot
I want to be able to create a new email item, set all of its properties (all
of them) and add them to a specific folder in Outlook (I am trying to add
items into Outlook that were not received via email).
I have gotten pretty far with this so far, but am running into some annoying
problems which I will describe.
So far, I have been able to create a new mail item in a specific folder like
this:
Outlook.MailItem mItem = (Outlook.MailItem)folder.Items.Add("IPM.Note");
set the body and subject and then do a:
mItem.Save();
mItem.Move(folder);
(which is weird to begin with... why create it in that folder and then have
to move it again?).
But that aside, here are my problems:
1. The above method creates a new email message as if I wanted to send it to
someone. It saves it as a draft email. However, this is not what I want. I
want it to be an email as if I had received it.
2. I want to be able to set the received date and Sender of the message. I
cannot do this, those properties are read-only.
If anyone knows how to accomplish any of the above tasks, I will be
eternally greatful.
of them) and add them to a specific folder in Outlook (I am trying to add
items into Outlook that were not received via email).
I have gotten pretty far with this so far, but am running into some annoying
problems which I will describe.
So far, I have been able to create a new mail item in a specific folder like
this:
Outlook.MailItem mItem = (Outlook.MailItem)folder.Items.Add("IPM.Note");
set the body and subject and then do a:
mItem.Save();
mItem.Move(folder);
(which is weird to begin with... why create it in that folder and then have
to move it again?).
But that aside, here are my problems:
1. The above method creates a new email message as if I wanted to send it to
someone. It saves it as a draft email. However, this is not what I want. I
want it to be an email as if I had received it.
2. I want to be able to set the received date and Sender of the message. I
cannot do this, those properties are read-only.
If anyone knows how to accomplish any of the above tasks, I will be
eternally greatful.