![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
have this chunk of code that creates an email body in outlook . If it is
regular text, it uses the PR_BODY_W property; if it is html format, then it uses 0x1013001F(PR_BODY_HTML_W). if (fishtml) { SPropValue vals; SPropProblemArray *lpprob; memset(&vals, 0, sizeof(SPropValue)); //vals.ulPropTag = PR_STORE_SUPPORT_MASK; vals.ulPropTag = PR_MSG_STATUS; vals.Value.l = 0x80000000; hr = mapiprop-SetProps(1, &vals, &lpprob); } hr = mapiprop-OpenProperty((fishtml?0x1013001F:PR_BODY_W), &IID_IStream, 0, MAPI_MODIFY|MAPI_CREATE, (IUnknown**)&lpistream); if (SUCCEEDED(hr)) { ULONG cnt = (::SysStringLen(bsbody)+1) * sizeof(wchar_t); ULONG cntwritten = 0; lpistream-Write(bsbody, cnt, &cntwritten); fsetbody = TRUE; } This works perfect in Outlook 2003. However, in Outlook 2007, the HTML mail message always comes up blank while PR_BODY_W is fine. I have also tried setting the PR_MSG_STATUS to 0x80000000(MSGSTATUS_HAS_PR_BODY_HTML ) , but it doesn't help. Any suugestions is greatly appreciated! Thank you very much. |
#2
|
|||
|
|||
![]()
Does the message in question actually the HTML body? What do you see in
MFCMAPI or OutlookSpy? What error code does OpenProperty() return? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "UTEK" wrote in message ... have this chunk of code that creates an email body in outlook . If it is regular text, it uses the PR_BODY_W property; if it is html format, then it uses 0x1013001F(PR_BODY_HTML_W). if (fishtml) { SPropValue vals; SPropProblemArray *lpprob; memset(&vals, 0, sizeof(SPropValue)); //vals.ulPropTag = PR_STORE_SUPPORT_MASK; vals.ulPropTag = PR_MSG_STATUS; vals.Value.l = 0x80000000; hr = mapiprop-SetProps(1, &vals, &lpprob); } hr = mapiprop-OpenProperty((fishtml?0x1013001F:PR_BODY_W), &IID_IStream, 0, MAPI_MODIFY|MAPI_CREATE, (IUnknown**)&lpistream); if (SUCCEEDED(hr)) { ULONG cnt = (::SysStringLen(bsbody)+1) * sizeof(wchar_t); ULONG cntwritten = 0; lpistream-Write(bsbody, cnt, &cntwritten); fsetbody = TRUE; } This works perfect in Outlook 2003. However, in Outlook 2007, the HTML message always comes up blank while PR_BODY_W is fine. I have also tried setting the PR_MSG_STATUS to 0x80000000(MSGSTATUS_HAS_PR_BODY_HTML ) , but it doesn't help. Any suugestions is greatly appreciated! Thank you very much. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I create an HTML email message? | Margaret Bartley | Outlook - General Queries | 4 | September 6th 08 01:54 AM |
How to create mail item in OL 2007 using MAPI | Ivan | Add-ins for Outlook | 4 | October 23rd 07 09:18 AM |
RTF my default; button to create HTML message directly? | StargateFanFromWork | Outlook - General Queries | 7 | May 10th 07 08:28 PM |
Displaying Unicode characters in MAPI Address Book | [email protected] | Outlook - General Queries | 1 | December 20th 06 10:23 PM |
Extracting Unicode MAPI properties using CDO | Bertin Colpron | Outlook - Using Forms | 0 | May 8th 06 04:28 PM |