A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook Macro to get Exchange Info from Mail



 
 
Thread Tools Search this Thread Display Modes
  #21  
Old May 6th 10, 08:18 AM posted to microsoft.public.outlook.program_vba
_M_a_t_t_[_2_]
external usenet poster
 
Posts: 12
Default Outlook Macro to get Exchange Info from Mail

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......
Ads
  #22  
Old May 6th 10, 08:19 AM posted to microsoft.public.outlook.program_vba
_M_a_t_t_[_2_]
external usenet poster
 
Posts: 12
Default Outlook Macro to get Exchange Info from Mail

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......
  #23  
Old May 6th 10, 09:46 AM posted to microsoft.public.outlook.program_vba
_M_a_t_t_[_2_]
external usenet poster
 
Posts: 12
Default Outlook Macro to get Exchange Info from Mail

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.
  #24  
Old May 6th 10, 03:54 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook Macro to get Exchange Info from Mail

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"_M_a_t_t_" wrote in message
...
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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Contacts Macro to Change Info Jason Outlook and VBA 1 November 14th 08 12:57 AM
Macro to rename Subject of E-mail on exchange server(2007) Ryan Arnold Outlook and VBA 4 October 6th 08 04:30 AM
outlook 2003 macro to extract calendar appointment info to Excel CPOjoe Outlook - Calandaring 3 July 15th 08 05:04 PM
retrieving Outlook user info from Word macro IndianSummer Outlook and VBA 1 September 29th 07 01:05 AM
Importing Outlook Alias info into an excel 2003 macro fidgitthedigit Outlook and VBA 4 May 31st 06 05:22 PM


All times are GMT +1. The time now is 05:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.