the original thread started here but i guess it's better suited for this forum.
i'm trying to read mail from a Microsoft Exchange server. the HTML portion is stored in a field in a compressed format. MS provides a function to uncompress the RTF here but it's in C++ which i'm pretty much clueless about. MerrionComputin gave me this API call which i've added:
i though i could pretty much do something like this:Code:Public Declare Function WrapCompressedRTFStream Lib "mapi32.dll" (ByVal lpCompressedRTFStream As Long , _ ByVal uFlags As Long , _ lpUncompressedStream As Long ) As Long
the function returns S_OK but the value of RTF_U is just 50000 spaces. is my logic flawed here?Code:CONST S_OK = &H0 myRTF = myMessage.Fields(CdoPR_RTF_COMPRESSED) ' get the compressed portion - this works fine myRTF_U = Space(50000) If WrapCompressedRTFStream(StrPtr(myRTF), 0, StrPtr(myRTF_U)) <> S_OK Then MsgBox("Error") End If
thanks!




Reply With Quote