Z
Zhiguo
Hi, my friends:
I can get the content of a word document *in plain text* by the
following code:
///////////////////////////////////////////////////////////////////////////
WORD::_DocumentPtr spDoc = m_spApp->ActiveDocument;
WORD::RangePtr spRange1=NULL;
spDoc->get_Content(&spRange1);
BSTR bstr1;
spRange1->get_Text(&bstr1);
///////////////////////////////////////////////////////////////////////////
But now I want to get the content in HTML format.
I know I can save the document in HTML format, and thus get the
content in HTML format.
Is there a way to do it directly? Without the "saving as" trick.
Thanks! Any help will be greatly appreciated!
I can get the content of a word document *in plain text* by the
following code:
///////////////////////////////////////////////////////////////////////////
WORD::_DocumentPtr spDoc = m_spApp->ActiveDocument;
WORD::RangePtr spRange1=NULL;
spDoc->get_Content(&spRange1);
BSTR bstr1;
spRange1->get_Text(&bstr1);
///////////////////////////////////////////////////////////////////////////
But now I want to get the content in HTML format.
I know I can save the document in HTML format, and thus get the
content in HTML format.
Is there a way to do it directly? Without the "saving as" trick.
Thanks! Any help will be greatly appreciated!