why my wsize == 0?

H

hostran

Hi

CComPtr<Outlook::_Inspectors> spInspectors;
Outlook::_MailItemPtr mailItem = NULL;
m_inspector->get_CurrentItem( (IDispatch** )&mailItem);
long wsize=0;
mailItem->get_Size(&wsize);

when mail is not "new create mail"(unsaved),I can get the wsize, but when I
copy content to a "new create mail",I get the wsize is 0 ! help me please .

Thanks in advance
 
D

Dmitry Streblechenko

PR_MESSAGE_SIZE (that's what MailItem.Size returns) is not available until
the message is saved.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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