Undocumented AFX function : AfxGetClassIDFromString

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

CAbsWordMngt::CAbsWordMngt()
{
CString strVersion;
CLSID clsid;

CoInitialize(NULL);

m_Version = 9;
if ( AfxGetClassIDFromString(“Word.Application.9”, &clsid) )
{
m_Version = 8;
if ( AfxGetClassIDFromString(“Word.Application.8”, &clsid) )
{
m_Version = 0;
AfxMessageBox(“WinWord version 8 or 9 not installed …”);
return;
}
}
}

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read