Add-Ins that work in Outlook 2003 break in Outlook 2007

N

NS

I have an Outlook Add-In written in VB 6 accessing CDO.dll that works fine in
Outlook 2003. A client upgraded to Vista and installed Outlook 2007 and now
the Add-In will not load. (BTW, it did load and work in the Beta version, so
I am not sure what has changed).

1. It is not in the disabled list but it is in the Inactive Application
Add-Ins list.

2. The first time I try to "check the box" in the "Add-Ins available" list,
the Windows Installer starts but errors out with this exact syntax:

"Error 2711.An internal error has occurred. (OutlookCDO
)

3. If I try to "check the box" again, the load behavior says "Not loaded. A
runtime error occurred during the loading of the COM Add-in." Again, this
works fine in Outlook 2003.

4. Then I tried to Regsvr32 a copy of CDO.dll that I copied from a system
with XP and Outlook 2003 and received an error "To register a module, you
must provide a binary file name". I did run as adminsitrator.

5. From a search recommendation, I tried to install ExchangeCDO.MSI but that
did not help. The same behavior occurs.

6. My understanding is that all add-ins are automatically trusted in Outlook
2007 but I tried removing the macro security check and checked "Apply macro
security settings to installed add-ins" with no luck.

If you need more information, I am happy to provide it for you.

Thanks in advance.
 
K

Ken Slovak - [MVP - Outlook]

CDO was included in the Office CD previously, as a partial deprecation step
it's now available for Outlook 2007 only as a separate download from the MS
Web site. So you can no longer use any demand install methods that you might
have used in the past (as shown in the ItemsCB addin sample on the Microeye
Web site).

Each version of CDO 1.21 is specific to a version of Office. You cannot mix
and match versions. The version for Outlook 2007 must be used for Outlook
2007, any other version will fail.

CDO is also not redistributable, so the only way for a user to get it on
their Outlook 2007 machine is to download and install it from the MS Web
site.
 
N

NS

Hello and thank you for your prompt reply.

I apologize for any ignorance on my part because I am new to Outlook
programming and this is a project that I inherited from someone else.

If I understand your recommendation correctly, I already tried it as part of
step 5 of my original post.

At http://office.microsoft.com/en-us/outlook/HA100926831033.aspx, it reads "
CDO.DLL is no longer included in Office Outlook 2007. Collaboration Data
Object (CDO) is an extensibility library that is provided by Microsoft
Exchange and used with the MAPI protocol. Customers of third-party
applications that require CDO.DLL now receive a message informing them that
an object could not be found. CDO must now be installed from the Internet.
Third parties must change their instructions about installing CDO from using
the Office CDO to installing from the Internet. Exchange provides a download
of CDO.DLL."

On the Exchange site, at
http://www.microsoft.com/downloads/...0D-C997-4DE1-986F-24F081725D36&displaylang=en,
I am told I can accomplish the recommended solution by downloading and
installing ExchangeCDO.MSI.

Is there a better, more relevant place to download what is required to
install Collaborate Data Objects for Outlook 2007? I have spent 4 full days
(including the weekend) researching this problem and I need to bring it to
resolution soon.

Any help you can provide is greatly appreciated.
 
K

Ken Slovak - [MVP - Outlook]

That's the download you want. As it indicates you cannot redistribute it, it
must be downloaded from MS.
 
N

NS

Thanks again for the information. I understand that I cannot redistribute it
and it must be downloaded from Microsoft. However, I installed it on a Vista
system but it did not solve my original problem:

1. My add-in is not in the disabled list but it is in the Inactive
Application Add-Ins list.
2. When I try to "check the box" in the "Add-Ins available" list, sometimes
Outlook initiates the windows installer to "configure Outlook 2007". This
errors out with
Error 2711.An internal error has occurred. (OutlookCDO). I have no installer
and install my Add-In manually, so this behavior is initiated from Outlook.
3. Other times, nothing happens and the Load Behavior indicates "Not loaded.
A runtime error occurred during the loading of the COM Add-in."
4. My error handling has not trapped any errors and there is nothing in the
event log.

Any additional help you can give is appreciated.
 
K

Ken Slovak - [MVP - Outlook]

What happens if you manually run regsvr32 on CDO? Does it help?

How are you initializing CDO and where?

How far does your code get before it errors out? Are you getting
OnConnection?

What CDO methods or properties are you using that you need to use CDO? In
some cases you can avoid the use of CDO with Outlook 2007 by using the
enhanced Outlook object model. If that's possible it's certainly preferable
to using CDO at all. The enhanced Outlook object model hasn't quite achieved
parity with CDO but it's close. If that's possible then you can late bind to
any methods or properties that are in Outlook 2007 and not in Outlook 2003
to be able to use them and still reference the Outlook 11 object model.
 
N

NS

When I manually run regsvr32 on CDO (running as administrator), I get: "To
register a module, you must provide a binary file name"

One of the requirements is to have a single add-in for Outlook 2002, 2003,
and 2007 because we have clients using each and cannot control what they
choose to install. The Add-In works on 2002 and 2003 with no problems.

The Outlook 2007 is on Vista - could this be security related? For grins, on
my test system I gave Everyone administrator rights but that did not seem to
help.

My error log contains no errors; this is written in VB 6 - could that be an
issue?
 
K

Ken Slovak - [MVP - Outlook]

My VB6 addins install and run on Vista with no problems. However, I have had
lots of problems trying to run regsvr32 on Vista as an admin logon even with
user access control turned off. I can't help with Vista security.

I haven't tried using the new CDO in any of my addins, due to the
deprecation of CDO and security problems with CDO code due to the Outlook
object model guard I've done all my addin development using Redemption
(www.dimastr.com/redemption) as a replacement and more for CDO 1.21. I've
even translated most of my older addins to use Redemption code instead of
CDO code.

Another advantage of Redemption over CDO is I can use it with .NET projects,
it works there and CDO is not supported at all for .NET code.
 
N

NS

I know we own Redemption and I need to comb through this code to see if it is
used. I have actually solved a few of the problems with the Add-In but there
are still more. You have been a great sounding board and I appreciate your
feedback. I was hoping that there was a security setting that could fix this,
but apparently there are multiple problems, so I will keep tackling them one
by one. Thanks again.
 
T

Tim Freeman

Hi,

I have been having the same problem. Various places have said that you must
download/install a version of CDO that is correct for your version of
Outlook. The only version I can find at MS is ExchangeMapiCdo.EXE which
generates a MSI which will not install if Outlook is present ie it is the
exchange version. However it works if you uninstall outlook and then
reinstall Outlook. Am I now running an "insecure" version of CDO? Does any
one know where the web address to download a 2007 version of CDO?

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top