A
AlexD
I do this code:
Outlook::_ApplicationPtr m_outlookApp =
Outlook::_ApplicationPtr("Outlook.Application");
if( (bool)m_outlookApp )
{
Outlook::_NameSpacePtr m_nameSpace = m_outlookApp->GetNamespace("MAPI");
bool rc = ((bool)m_nameSpace);
if(!rc)
MessageBox(_T("Wrong MAPI"));
}
else
MessageBox(_T("Wrong Outlook.Application"));
MessageBox(_T("OK"));
if I do it when outlook switch off - I get "OK"
but if I turn on outlook - I get "Wrong Outlook.Application"
what can be wrong?
Thanks.
Outlook::_ApplicationPtr m_outlookApp =
Outlook::_ApplicationPtr("Outlook.Application");
if( (bool)m_outlookApp )
{
Outlook::_NameSpacePtr m_nameSpace = m_outlookApp->GetNamespace("MAPI");
bool rc = ((bool)m_nameSpace);
if(!rc)
MessageBox(_T("Wrong MAPI"));
}
else
MessageBox(_T("Wrong Outlook.Application"));
MessageBox(_T("OK"));
if I do it when outlook switch off - I get "OK"
but if I turn on outlook - I get "Wrong Outlook.Application"
what can be wrong?
Thanks.