However, I can not use this sample to open an existing Word document.
I am wondering if some one can give me some help here.
I am also wondering if I can do this, open an existing word document and copy
all contents into the new word document created in the above sample.
I can not find any copy function in _Document or Documents, those 2 classes
are
generated from word type library.
TIA for any help.
emcz
Have you thought of looking for a function that opens an existing document?
joe
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
TRY
{
...
if(...)
//Any exception will do. You just need to break out of the
//TRY statement
AfxThrowMemoryException();
CATCH(CException, e)
{
}
END_CATCH
The use of the obsolete macros shows that this example has not been updated in decades.
It is probably an error to catch CException (as opposed to the expected COleException*
that will be thrown), and the use of a throw immediately contained inside a try has been
discussed as an exceptionally (pun intended) bad practice. The slovenliness of throwing
"any old exception" and having a catch that catches any exception is particularly
offensive.
Looks like another "summer intern" code example written without adult supervision. And
another really good example for my "Bad MSDN Examples" series.
joe
On Fri, 25 Jun 2010 11:58:24 -0700, emcz <em...@discussions.microsoft.com> wrote:
"Joseph M. Newcomer" wrote:
> .
>