none
Using Microsoft.Office.Interop.Word.Document.SaveAs to save as .html file (filtered)

    Question

  •  Hello,

    My name Tan Khai, I use Microsoft.Office.Interop.Word.Document.SaveAs to SaveAs a .doc file to .html file (filtered)
    ------------------my code (C#)--------------------------
    //.....
    Word.Document oDoc = objWord.ActiveDocument;
    object Format = (int)Word.WdSaveFormat.wdFormatFilteredHTML;
    oDoc.SaveAs(ref fileName, ref Format, ref missing, ref missing, ref missing, ref missing, ref missing,
    ref missing, ref missing, ref missing, ref missing, ref encoding, ref missing, ref missing, ref missing, ref missing);
    ------------------------------------------------------------
    But in .html file, font of some object such as ClipArt, Textbox, ...is lost (I use font: Times New roman with character set is Unicode

    Please see my demo in .rar file can be download at: http://www.mtools.vn/word_question.rar

    How can I fix this problem?

    Looking for respond.

    Thanks a lot

    tankhai

    Sunday, March 01, 2009 2:20 PM

Answers

  • Hi,

    When we save the doc file as .html file , Textbox is save as .gif file .
    The folder you uploaded also contains the .gif files converted from Textbox.

    Some of the features in word file aren't supported by Web browsers when the file is converted to web page. So some elements in the word file may  be converted to another kind of form.
    For more information , please see:

    http://support.microsoft.com/default.aspx/kb/212270/en-us

    Best regards,
    Harry
    http://cfx.codeplex.com where you can find samples you are looking for
    • Proposed as answer by Harry Zhu Thursday, March 05, 2009 9:46 AM
    • Marked as answer by Harry Zhu Friday, March 06, 2009 9:00 AM
    Wednesday, March 04, 2009 7:46 AM