J
Julieta Prandi
Hi,
I'm trying to make work a addin in Outlook 97 but it seems complex
I've implemented in the exchange way and the Install function is called.
In EECONTEXT_VIEWER I'm trying to get the ActiveExplorer but it throws a
exception if I use Office 2k type libraries or it returns NULL if I use
Office 97 typelibraries.
This addin works fine in Office 2k.
I include the typelibrary in this way (I copied from another mail sent here
from a MVP):
// Define this according to the OL version you are compiling under
#define OUTL8 // #define OUTL8 or OUTL85 or OUTL9
#if defined(OUTL9) // Outlook 2000
#import "C:\Program Files\Microsoft Office\Office\mso9.dll" //IMPPROPS
#import "C:\Program Files\Microsoft Office\Office\msoutl9.olb" //IMPPROPS
#elif defined(OUTL85) // Outlook 98
#import "C:\Program Files\Microsoft Office\Office\mso97.dll" IMPPROPS
#import "C:\Program Files\Microsoft Office\Office\msoutl85.olb" IMPPROPS
#elif defined(OUTL8) // Outlook 97
#import "stdole2.tlb" IMPPROPS include("IPicture") \
exclude("Font", "IUnknown", "IDispatch", "IEnumVARIANT", "IFont")
#import "fm20.dll" IMPPROPS include("IFont") \
exclude("OLE_COLOR", "OLE_HANDLE") rename("Pages", "FMPages")
#pragma warning(disable: 4146)
#import "c:\Program Files\Microsoft Office\Office\mso97.dll" Office \
rename("DocumentProperties", "DocProps")
#pragma warning(default: 4146)
#import "c:\Program Files\Microsoft Office\Office\msoutl8.olb" Outlook \
rename("_IMailItem", "_MailItem")
#endif
The code that doesn't work is:
....
case EECONTEXT_VIEWER:
GetOutlookApp(lpExchangeCallback, m_olAppPtr); // this line works
fine (in the same it works in 2k)
Outlook::_IExplorerPtr spExplorer = m_olAppPtr->ActiveExplorer();
the spExplorer always return NULL or a exception is thrown using 2k
libraries.
Please help me!
Thank you!
<-- Julieta -->
I'm trying to make work a addin in Outlook 97 but it seems complex
I've implemented in the exchange way and the Install function is called.
In EECONTEXT_VIEWER I'm trying to get the ActiveExplorer but it throws a
exception if I use Office 2k type libraries or it returns NULL if I use
Office 97 typelibraries.
This addin works fine in Office 2k.
I include the typelibrary in this way (I copied from another mail sent here
from a MVP):
// Define this according to the OL version you are compiling under
#define OUTL8 // #define OUTL8 or OUTL85 or OUTL9
#if defined(OUTL9) // Outlook 2000
#import "C:\Program Files\Microsoft Office\Office\mso9.dll" //IMPPROPS
#import "C:\Program Files\Microsoft Office\Office\msoutl9.olb" //IMPPROPS
#elif defined(OUTL85) // Outlook 98
#import "C:\Program Files\Microsoft Office\Office\mso97.dll" IMPPROPS
#import "C:\Program Files\Microsoft Office\Office\msoutl85.olb" IMPPROPS
#elif defined(OUTL8) // Outlook 97
#import "stdole2.tlb" IMPPROPS include("IPicture") \
exclude("Font", "IUnknown", "IDispatch", "IEnumVARIANT", "IFont")
#import "fm20.dll" IMPPROPS include("IFont") \
exclude("OLE_COLOR", "OLE_HANDLE") rename("Pages", "FMPages")
#pragma warning(disable: 4146)
#import "c:\Program Files\Microsoft Office\Office\mso97.dll" Office \
rename("DocumentProperties", "DocProps")
#pragma warning(default: 4146)
#import "c:\Program Files\Microsoft Office\Office\msoutl8.olb" Outlook \
rename("_IMailItem", "_MailItem")
#endif
The code that doesn't work is:
....
case EECONTEXT_VIEWER:
GetOutlookApp(lpExchangeCallback, m_olAppPtr); // this line works
fine (in the same it works in 2k)
Outlook::_IExplorerPtr spExplorer = m_olAppPtr->ActiveExplorer();
the spExplorer always return NULL or a exception is thrown using 2k
libraries.
Please help me!
Thank you!
<-- Julieta -->