Saved Property of MailItem is copied

Status
Not open for further replies.
S

Scratch Head

Hi,

I wish to copy the original mail to another separate folder. My code is as

follows:

using Outlook = Microsoft.Office.Interop.Outlook

MailItem mailItem; // mailItem is set accordingly.

Outlook.Namespace namespc = mailItem.Application.GetNamespace("MAPI");

Outlook.folder =

(Outlook.Folder)namespc.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts);

Outlook.MailItem tempMail = (Outlook.MailItem)mailItem.Copy(); // This is

the statement where mailItem.Saved changes from true to false

Outlook.MailItem newMail = (Outlook.MailItem)tempMail.Move(folder);

Pls advise why this phenomenon is observed.
 
Which item is not saved? If it's the copy item just save it.

"Scratch Head" <Scratch Head> wrote in message

news:A8177686-FC3C-4E04-A427-6B0E71971FF5@microsoft.com...
> Hi,

> I wish to copy the original mail to another separate folder. My code is as
> follows:

> using Outlook = Microsoft.Office.Interop.Outlook

> MailItem mailItem; // mailItem is set accordingly.

> Outlook.Namespace namespc = mailItem.Application.GetNamespace("MAPI");
> Outlook.folder =
> (Outlook.Folder)namespc.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts);
> Outlook.MailItem tempMail = (Outlook.MailItem)mailItem.Copy(); // This is
> the statement where mailItem.Saved changes from true to false
> Outlook.MailItem newMail = (Outlook.MailItem)tempMail.Move(folder);

> Pls advise why this phenomenon is observed.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A Outlook 365 New Appointments All saved to a 365 default calendar on Mac Using Outlook 0
M Extract "Date sent" from emails (saved to folder using drag and drop) Outlook VBA and Custom Forms 1
N Item cannot be saved because it was modified by another user or window, and, Item could not be moved... Using Outlook 0
e_a_g_l_e_p_i Changing where data .pst is saved to Using Outlook 3
L Outlook saved template function too limited Using Outlook 2
P outlook 2008 search box criteria couldn't be saved Using Outlook 2
R Limiting length of saved attachment in VBA Outlook VBA and Custom Forms 2
L Outlook saved email templates Using Outlook 1
T Pictures degrade each time an Outlook item is edited and re-saved Using Outlook 1
N Macro for attachment saved and combine Outlook VBA and Custom Forms 1
S Importing Ribbons Not Saved Using Outlook 7
Cdub27 Your changes to this item couldn't be saved because Server Denied Operation (HTTP 403 Forbidden) Using Outlook 1
C Changing the name of Outlook Messages saved to a folder Using Outlook 1
R Outlook 2010 - Reading Pane and To Do Bar Settings Not Saved on Exit Using Outlook 2
Jessica .msg file saved in network drive appearing in Deleted Items folder Using Outlook 3
B Saved emails in folders I created on left of screen are being erased as I open each folder Using Outlook 0
P OUTLOOK TEMPLATES ARE NOT SAVED IN SENT FOLDER Using Outlook 1
P Item cannot be saved because it was modified by another user or window Using Outlook 8
bhogesh How to import .htm saved mail to outlook Using Outlook 3
I how to create appointment using saved template onto public folder shared calendar Using Outlook 3
B Configure Outlook so Exchange uses cached mode but new items are by default saved to Outlook.com Using Outlook 1
Hudas Hyperlink Saved Outlook Email to MS Access Table Using Outlook 4
4 VBA - How to retrieve Meetings Saved but Not Sent? Using Outlook 0
F Outlook 2007 is not remembering saved passwords Using Outlook 2
J Changed my "From" email address creates problem with previously saved contacts Using Outlook 20
K External Mtg Invitees have =SMTP: added to email address after mtg saved Using Outlook 5
B Opening a saved Outlook customized form the same folder Using Outlook 2
B Opening a saved Outlook customized form after moving it to another folder Using Outlook 2
D Saved emails not appearing in draft folder Using Outlook 3
G Where are Saved Reports physically stored? BCM (Business Contact Manager) 0
E Sent Emails not being saved Using Outlook.com accounts in Outlook 1
R Outlook Options can not be saved Using Outlook 0
I Outlook 2010 Saved Drafts Time & Date "NONE" - Ideas? Using Outlook 5
R Password not accepted but works when saved. Using Outlook 3
P the outlook 2007 calendar cannot be saved because it was changed by another user or in another windo Using Outlook 4
R Exported BCM file and it saved as .ssb. Now can't import. BCM (Business Contact Manager) 2
A New Contact entry (custom form) get saved in a public folder and doesn't appear in Outolook Contacts Outlook VBA and Custom Forms 3
M Senders email address in saved attachment Outlook VBA and Custom Forms 1
S Custom Fields - Deleting And Where Are They Saved Outlook VBA and Custom Forms 8
X Attached MSG files change when saved Outlook VBA and Custom Forms 1
C Emails saved to network drive Outlook VBA and Custom Forms 1
L How do I Run Saved Export in Access 2007 VBA? Outlook VBA and Custom Forms 1
A how to detect email is saved to draft? Outlook VBA and Custom Forms 3
S Categories Not Saved Outlook VBA and Custom Forms 22
R State of encrypt and sign button for a saved mail?(draft) Outlook VBA and Custom Forms 3
Y message attachment saved by Outlook.Attachment.SaveFileAs not open Outlook VBA and Custom Forms 7
N How can i see all the email addresses I have used but not saved ? BCM (Business Contact Manager) 1
D Unable to change AppointmentItem.Start property Outlook VBA and Custom Forms 3
S Problem Accessing .MSG Property 'ImageNaturalHeight' Tag '0x80010003' Outlook VBA and Custom Forms 1
P MailItem.To Property with VBA not work Outlook VBA and Custom Forms 2

Similar threads

Back
Top