mailItem move() changes receive time

K

k4fu

if im moving a mailitem to an other folder on one system the receive time of
the mailItem changes to the current date; Why???

i cant reproduce this problem on other machines with same system;

does anyone know how to solv this problem?

public bool bOrdnerFound = false;
public Ol.MAPIFolder oFoundFolder = null;

public void verschiebeMail(Ol.MailItem oMailItem, string sOrdner)
{
Ol.NameSpace objNS;
Ol.Folders oFolders;

try
{
objNS = myApplication.GetNamespace("MAPI");
oFolders = objNS.Folders;
bOrdnerFound = false;
oFoundFolder = null;

//gets the folder
gotoFolder(oFolders, sOrdner.Substring(1));

if (oFoundFolder != null)
oMailItem.Move(oFoundFolder);
}
catch (Exception ex)
{
System.Diagnostics.Debug.Write(ex.Message);
MessageBox.Show(ex.Message);
}
}
 
K

Ken Slovak - [MVP - Outlook]

If something happens on only 1 machine and the code works everywhere else I
would look at what's different on that machine. Are any addins, VBA macros
or external code running that might be modifying items moved to that folder?
Does this happen if you move items to different folders? You're going to
have to do some detective work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top