![]() |
MAPI create object error
Hi,
i'm having problem with instantiating MAPISession object.. the code works on my other desktop (desktop2) just fine.. both machines Win2K and Excel 2K.. i deleted existing MSMAPI32.ocx from desktop1 and then dropped three files copied from destop2 (msmapi32.dep, msmapi.srg, msmapi32.ocx) on desktop1, registered ocx with regsvr32, made reference in excel to that ocx file (Microsoft MAPI Controls 5.0 (SP2) but code generates the err message that ActiveX can't be created.. I would think that ocx is corrupted but since it's the same file which works perfectly on desktop2 i ran out of ideas why it behaives that way... here's two ways i tried to instantiate that object Dim objMapiSession As New MAPISession Dim objMapiMessage As MAPIMessages With objMapiSession ( HERE ERR GENERATES) blah, blah... end with i tried different way: Dim objMapiSession As Object Dim objMapiMessage As Object Set objMapiSession = CreateObject("MSMAPI.MAPISession")( HERE ERR GENERATES) Set objMapiMessage = CreateObject("MSMAPI.MAPIMessages") i checked newsgourps on that topic but could not find anything helpful... Would appreciate any help on it thanks in advance Dim |
All times are GMT +1. The time now is 06:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com