Wednesday, July 09, 2014

Collaboration Data Objects (CDO) 1.2.1 with Outlook 2010 and 2013

Many vbscripts use old Outlook / Exchange CDO components for MAPI access. Without CDO you'll get "ERROR: ActiveX component can't create object (MAPI.Session)" error message. Unfortunately CDO works only with 32-bit Outlook 2007. If you're running 32-bit Outlook 2010 or 2013 in either 32-bit or 64-bit OS following might come handy.
  • Download and install 7-Zip. http://sourceforge.net/projects/sevenzip/
  • Download ExchangeCdo.EXE. http://www.microsoft.com/en-us/download/details.aspx?id=3671
  • Extract ExchangeCdo.EXE using 7-Zip.
  • Extract ExchangeCdo.MSI using 7-Zip.
  • Rename CDO.DLL.4C20E007_152A_4229_B6AE_3495BD756E7F to CDO.DLL
  • Rename GAPI32.DLL.4C20E007_152A_4229_B6AE_3495BD756E7F to GAPI32.DLL
  • Copy both DLLs to C:\Windows\SysWOW64 (64-bit OS) or to C:\Windows\System32 (32-bit OS)
  • Register CDO.DLL with "REGSVR32 C:\Windows\SysWOW64\CDO.DLL" (64-bit OS) "REGSVR32 C:\Windows\System32\CDO.DLL" (32-bit OS). Make sure you're running REGSVR32 as elevated admin.
  • Done.


Since CDO is 32-bit if you're running vbscript in 64-bit OS you'll need to use 32-bit environment to run it. C:\windows\syswow64\cscript.exe

Some more information from Microsoft. http://support.microsoft.com/kb/2028411

1 comment:

  1. Great Fix, Worked Perfectly on Outlook 2016!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Thanks a Million,

    #1 Fan

    ReplyDelete

Got something to say?!