Outlook Macro to get Exchange Info from Mail

K

Ken Slovak - [MVP - Outlook]

Try setting a reference to CDO.DLL in the references for your VBA project.
 
M

_M_a_t_t_

Hi Ken,
Try setting a reference to CDO.DLL in the references for your VBA project.
I have this already:
Microsoft CDO 1.21 Library
C:\Program Files\Common Files\System\MSMAPI\1033\CDO.DLL

I'm starting to think this isn't possible.......
 
M

_M_a_t_t_

Hi Ken,
Try setting a reference to CDO.DLL in the references for your VBA project.
I have this already:
Microsoft CDO 1.21 Library
C:\Program Files\Common Files\System\MSMAPI\1033\CDO.DLL

I'm starting to think this isn't possible......
 
M

_M_a_t_t_

Hi Ken,
Try setting a reference to CDO.DLL in the references for your VBA project.
I have this already:
Microsoft CDO 1.21 Library
C:\Program Files\Common Files\System\MSMAPI\1033\CDO.DLL

I'm starting to think this isn't possible......
 
M

_M_a_t_t_

Found the/a solution.

Adding Option Explicit to the head of the Module, and then Diming each
variable finally got results. Wish someone had mentioned this....

This now brings me to my next two questions:
1. How to go though each element and not cause an error message to be
displayed when nothing is there (for example if
CdoPR_BUSINESS_ADDRESS_POSTAL_CODE is empty, I get an error that allows me to
End or Debug. I'd like to skip this, and just leave it empty)?
2. How to desable to prompt from Outlook asking if I want to allow the macro
to access:
A program is trying to access e-mail addresses you have stored in Outlook.
Do you want to allow this?

I can only allow 1, 2, 5 & 10 Minutes. But not an always allow. I have
digitally signed the macros, and all work without prompting until CDO is
accessed, then the prompt appears.
 
K

Ken Slovak - [MVP - Outlook]

For 1 you'd add an On Error Resume Next statement and check for IsEmpty() on
the property and check for an error. If you have either you can clear the
error and just move on.

For 2 that's the reason most of stopped using CDO many years ago, the
security. Client side CDO actually has tighter security than the Outlook
object model (server side CDO has none of the security but should not be
installed where Outlook is installed). There are hacks and kludges such as
ExpressClickYes, but I'd rather not use things like that. As a substitute
for CDO most of us have moved on to using Redemption.
 

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