Eugene Gershnik
Guest
|
Posted:
Thu Sep 01, 2005 8:58 am Post subject:
Date of items created with CDOEX |
|
|
I am trying to populate a public folder with some messages. The JScript code
is as follows
var msg = new ActiveXObject("CDO.Message");
msg.Fields(cdoDate) = some_date.getVarDate();
msg.Fields(cdoReceived) = some_date.getVarDate();
msg.Fields.Update();
msg.Subject = some_title;
msg.From = some_name;
msg.HTMLBody = some_text;
msg.DataSource.SaveToContainer(folder_url,
con, //a connection created earlier
adModeReadWrite,
adCreateNonCollection | adCreateOverwrite,
adOpenSource,
"", "");
Everything works [almost] fine. The message is added, the title, from field
and content are ok and I can see the correct Date and Received headers when
looking in Outlook's Right-click+Options. However, the Received date that
Outlook actually shows in the folder view as well as in item's properties is
the current one. Is there any way to set the date I want?
--
Eugene
http://www.gershnik.com
|
|
Tom Rizzo [MSFT]
Guest
|
Posted:
Sun Sep 11, 2005 12:58 am Post subject:
Re: Date of items created with CDOEX |
|
|
The server will want to put its own timestamp rather than yours for security
reasons.
Tom
--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp
"Eugene Gershnik" <gershnik@hotmail.com> wrote in message
news:%238ue5KsrFHA.2272@TK2MSFTNGP11.phx.gbl...
| Quote: | I am trying to populate a public folder with some messages. The JScript
code is as follows
var msg = new ActiveXObject("CDO.Message");
msg.Fields(cdoDate) = some_date.getVarDate();
msg.Fields(cdoReceived) = some_date.getVarDate();
msg.Fields.Update();
msg.Subject = some_title;
msg.From = some_name;
msg.HTMLBody = some_text;
msg.DataSource.SaveToContainer(folder_url,
con, //a connection created earlier
adModeReadWrite,
adCreateNonCollection | adCreateOverwrite,
adOpenSource,
"", "");
Everything works [almost] fine. The message is added, the title, from
field and content are ok and I can see the correct Date and Received
headers when looking in Outlook's Right-click+Options. However, the
Received date that Outlook actually shows in the folder view as well as in
item's properties is the current one. Is there any way to set the date I
want?
--
Eugene
http://www.gershnik.com
|
|
|