Message body is blank when set ContentMediaType to TextHtml with CDO.Message RRS feed

  • Question

  • Dear All,

    I want to convert HTML file to MHT with CDO.Message class.

    I found the converted MHT file is not encoded by what I want.

    I try to set BodyPart.ContentTransferEncoding to "quoted-printable". During compile, VS2012 prompt me that "Multipart body parts must be encoded as 7bit, 8bit, or binary.".

    I add the statement "BodyPart.ContentMediaType = CDO.CdoContentTypeValues.cdoTextHTML" before the set BodyPart.ContentTransferEncoding.

    All right, the coding can be compiled and run.

    But, I found the converted MHT file don't contain any content.

    Could you please give me some idea?


    Liu Ming

    • Moved by Mark Liu-lxf Wednesday, April 25, 2012 4:19 AM (From:Visual Basic General)
    Tuesday, April 24, 2012 12:33 AM

All replies

  • Hi Liu,

    Welcome to the MSDN forum.

    This is a VB.Net forum. I’m afraid that your topic about CDO is out of scope here. For better support, I will move this thread to the development in Exchange Server Forums.

    Sorry for any inconvenience and have a nice day.

    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, April 25, 2012 4:18 AM