goldyhon
Guest
|
Posted:
Sun Nov 27, 2005 5:58 pm Post subject:
CDO charset refresh problems |
|
|
I have a weird sync problem with CDO on exchange 2003.
I'm trying to open an email item on exchange using the CDO interface and
debug its charset. Below is the benchmark I'm using:
string msgUrl = <my message url>;
CDO.Message Msg = new CDO.MessageClass();
Msg.DataSource.Open(msgUrl,
null,
ADODB.ConnectModeEnum.adModeReadWrite,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource,
"",
"");
string charset1 = Msg.HTMLBodyPart.Charset;
string charset2 = Msg.HTMLBodyPart.Charset;
Console.WriteLine(charset1 + " - " + charset2);
My problem was that I got the wrong charset.
So I started debugging it.
I placed a breakpoint before charset2 line executing.
When reaching this line I looked at the value recieved in charset1 and it
was null.
So I went to look at the value of the Msg.HTMLBodyPart.Charset in the quick
view and saw my non latin encoding value.
I then stepped over charset2 and ofcourse it got the right value.
If I do not use the quick view in the debugger, I get the wrong charset for
both calls.
It looks as if when openning the CDO object there should be some force of
content extraction.
Any ideas?
Thanks,
goldyon.
|
|