Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Outlook Macro to get Exchange Info from Mail (http://www.outlookbanter.com/outlook-vba/101805-outlook-macro-get-exchange-info.html)

_M_a_t_t_ April 13th 10 10:31 AM

Outlook Macro to get Exchange Info from Mail
 
Hi, I'm working on a macro in Outlook 2003 SP3 that, when started, displays
an Email in a custom dialog, broken down into elements. The dialog is used
for Email processing. Upgrading Outlook is not possible, and adding addons is
also not possible (other then what is currently installed).

What I'm looking to achieve is, when an Email is from Exchange (company
email), to display the information found when you right click on the senders
name and choose 'Outlook Properties'. Things displayed here, are, for
example, the address, country & telephone number. The sender is not in the
contacts in Outlook. I want to get the contact information from the Email.

I'm accessing the information from the Email with something like this (I
have seen that MAPI can be used, but I have not found an example that work
like this, if someone can correct me here, I'd be greatful):

Dim olkItem As Outlook.MailItem

For Each olkItem In Application.ActiveExplorer.Selection

'Read the info and enter it into the dialog

'Example info: MsgBox olkItem.SenderEmailAddress

Next

How can I access the Exchange information from the mail item? I hope I have
explained this clearly enough.

Thanks for your time.

Office Version:Office 2003 / Operating System:Windows XP

Ken Slovak - [MVP - Outlook] April 13th 10 02:56 PM

Outlook Macro to get Exchange Info from Mail
 
You can get the Exchange Global Address List as a member of the
Outlook.AddressLists collection.

You then would have to find the AddressEntry that corresponds to the
sender's AddressEntry in the GAL. From there you could get some of the
property you refer to, just what's exposed for an AddressEntry.

You pretty much would have to iterate the AddressEntries collection in the
GAL AddressList to find one where the name matched the AddressEntry.Name
property.

What is exposed for an AddressEntry does not include telephone numbers,
country, mailing address or a lot of other things. For those properties you
would need to use other methods such as Extended MAPI or Redemption
(www.dimastr.com/redemption) or CDO 1.21 or even LDAP queries.

--
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
...
Hi, I'm working on a macro in Outlook 2003 SP3 that, when started,
displays
an Email in a custom dialog, broken down into elements. The dialog is used
for Email processing. Upgrading Outlook is not possible, and adding addons
is
also not possible (other then what is currently installed).

What I'm looking to achieve is, when an Email is from Exchange (company
email), to display the information found when you right click on the
senders
name and choose 'Outlook Properties'. Things displayed here, are, for
example, the address, country & telephone number. The sender is not in the
contacts in Outlook. I want to get the contact information from the Email.

I'm accessing the information from the Email with something like this (I
have seen that MAPI can be used, but I have not found an example that work
like this, if someone can correct me here, I'd be greatful):

Dim olkItem As Outlook.MailItem

For Each olkItem In Application.ActiveExplorer.Selection

'Read the info and enter it into the dialog

'Example info: MsgBox olkItem.SenderEmailAddress

Next

How can I access the Exchange information from the mail item? I hope I
have
explained this clearly enough.

Thanks for your time.

Office Version:Office 2003 / Operating System:Windows XP



_M_a_t_t_[_2_] April 14th 10 08:27 AM

Outlook Macro to get Exchange Info from Mail
 
Thanks for the answer Ken.

I can not install the redemption Reference, however I do have Microsoft CDO
1.21 Reference. I can also use MAPI. Can you provide an example of how to
access the information I'm refering to using either (or both)?

In the example I posted, I can access all the elements of Outlook.MailItem.
Its the elements of Outlook.ContactItemI'm wanting to access from the Email
only, and I can not find a way nor an example of how to do this. Only on how
to access the information from the contact (Contacts saved in Outlook Address
Book locally) from Outlook.ContactItem via address book.

"Ken Slovak - [MVP - Outlook]" wrote:

You can get the Exchange Global Address List as a member of the
Outlook.AddressLists collection.

You then would have to find the AddressEntry that corresponds to the
sender's AddressEntry in the GAL. From there you could get some of the
property you refer to, just what's exposed for an AddressEntry.

You pretty much would have to iterate the AddressEntries collection in the
GAL AddressList to find one where the name matched the AddressEntry.Name
property.

What is exposed for an AddressEntry does not include telephone numbers,
country, mailing address or a lot of other things. For those properties you
would need to use other methods such as Extended MAPI or Redemption
(www.dimastr.com/redemption) or CDO 1.21 or even LDAP queries.

--
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
...
Hi, I'm working on a macro in Outlook 2003 SP3 that, when started,
displays
an Email in a custom dialog, broken down into elements. The dialog is used
for Email processing. Upgrading Outlook is not possible, and adding addons
is
also not possible (other then what is currently installed).

What I'm looking to achieve is, when an Email is from Exchange (company
email), to display the information found when you right click on the
senders
name and choose 'Outlook Properties'. Things displayed here, are, for
example, the address, country & telephone number. The sender is not in the
contacts in Outlook. I want to get the contact information from the Email.

I'm accessing the information from the Email with something like this (I
have seen that MAPI can be used, but I have not found an example that work
like this, if someone can correct me here, I'd be greatful):

Dim olkItem As Outlook.MailItem

For Each olkItem In Application.ActiveExplorer.Selection

'Read the info and enter it into the dialog

'Example info: MsgBox olkItem.SenderEmailAddress

Next

How can I access the Exchange information from the mail item? I hope I
have
explained this clearly enough.

Thanks for your time.

Office Version:Office 2003 / Operating System:Windows XP


.


Ken Slovak - [MVP - Outlook] April 14th 10 07:45 PM

Outlook Macro to get Exchange Info from Mail
 
For MAPI you'd need to use the IAddressBook interface, but I'm not a MAPI
programmer so you can see if Dmitry sees this, start another thread that
might catch his attention, or post in
microsoft.public.win32.programmer.messaging (which is a group for MAPI
programmers).

I haven't done any CDO coding in probably almost 8 years, I couldn't help
with that. You might find something relevant at www.cdolive.com, either in
the sample snippets or sample projects. Sig had a lot of valuable stuff
there, but with Redemption I just don't use CDO because of the highly
restricted security environment in client side CDO. Server side CDO is not
restricted in the same way.

--
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
...
Thanks for the answer Ken.

I can not install the redemption Reference, however I do have Microsoft
CDO
1.21 Reference. I can also use MAPI. Can you provide an example of how to
access the information I'm refering to using either (or both)?

In the example I posted, I can access all the elements of
Outlook.MailItem.
Its the elements of Outlook.ContactItemI'm wanting to access from the
Email
only, and I can not find a way nor an example of how to do this. Only on
how
to access the information from the contact (Contacts saved in Outlook
Address
Book locally) from Outlook.ContactItem via address book.



Dmitry Streblechenko April 15th 10 07:20 AM

Outlook Macro to get Exchange Info from Mail
 
So d oyo uwant to access EX specific properties of a contact that was create
in the hContacts folder from one of the GAL entries?
Or EX properties of a message sender/recipient?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"_M_a_t_t_" wrote in message
...
Thanks for the answer Ken.

I can not install the redemption Reference, however I do have Microsoft
CDO
1.21 Reference. I can also use MAPI. Can you provide an example of how to
access the information I'm refering to using either (or both)?

In the example I posted, I can access all the elements of
Outlook.MailItem.
Its the elements of Outlook.ContactItemI'm wanting to access from the
Email
only, and I can not find a way nor an example of how to do this. Only on
how
to access the information from the contact (Contacts saved in Outlook
Address
Book locally) from Outlook.ContactItem via address book.

"Ken Slovak - [MVP - Outlook]" wrote:

You can get the Exchange Global Address List as a member of the
Outlook.AddressLists collection.

You then would have to find the AddressEntry that corresponds to the
sender's AddressEntry in the GAL. From there you could get some of the
property you refer to, just what's exposed for an AddressEntry.

You pretty much would have to iterate the AddressEntries collection in
the
GAL AddressList to find one where the name matched the AddressEntry.Name
property.

What is exposed for an AddressEntry does not include telephone numbers,
country, mailing address or a lot of other things. For those properties
you
would need to use other methods such as Extended MAPI or Redemption
(www.dimastr.com/redemption) or CDO 1.21 or even LDAP queries.

--
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
...
Hi, I'm working on a macro in Outlook 2003 SP3 that, when started,
displays
an Email in a custom dialog, broken down into elements. The dialog is
used
for Email processing. Upgrading Outlook is not possible, and adding
addons
is
also not possible (other then what is currently installed).

What I'm looking to achieve is, when an Email is from Exchange (company
email), to display the information found when you right click on the
senders
name and choose 'Outlook Properties'. Things displayed here, are, for
example, the address, country & telephone number. The sender is not in
the
contacts in Outlook. I want to get the contact information from the
Email.

I'm accessing the information from the Email with something like this
(I
have seen that MAPI can be used, but I have not found an example that
work
like this, if someone can correct me here, I'd be greatful):

Dim olkItem As Outlook.MailItem

For Each olkItem In Application.ActiveExplorer.Selection

'Read the info and enter it into the dialog

'Example info: MsgBox olkItem.SenderEmailAddress

Next

How can I access the Exchange information from the mail item? I hope I
have
explained this clearly enough.

Thanks for your time.

Office Version:Office 2003 / Operating System:Windows XP


.




_M_a_t_t_[_2_] April 16th 10 07:38 AM

Outlook Macro to get Exchange Info from Mail
 
The contact does not exist in the local address book. What I want to access
is the contact information you can access when right clicking on From name
and choosing Outlook Properties. With non exchange senders, you Display
name, E-mail address, E-mail type, and Internet format. When its an Exchange
mail, you get (provided entered), shipping address, phone number(s), country
etc. Its this information I'd like to access directly from the Email (as the
contact isn't in the local address book, and I'm reading in, parcing and
displaying information from the email). However, I can not install additional
plug-ins. I need to be able to do this with what Outlook already has. I'm
assuming this can be done with Microsoft CDO 1.21 Reference and/or MAPI, but
I need an example of how to access the information from the email and contact
in 1 loop (or perhaps via a sub function called from the main loop. Again I'm
currently using this formation to read out the information from the Email:

Dim olkItem As Outlook.MailItem
For Each olkItem In Application.ActiveExplorer.Selection
'Read the info and enter it into the dialog
'Example info: MsgBox olkItem.SenderEmailAddress
Next

And this works fine (as long as only 1 mail is selected, more then one
causes problems, since each would be processed, but only the last selected
would actually be displayed).

Matt

"Dmitry Streblechenko" wrote:

So d oyo uwant to access EX specific properties of a contact that was create
in the hContacts folder from one of the GAL entries?
Or EX properties of a message sender/recipient?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-



_M_a_t_t_[_2_] April 20th 10 11:06 AM

Outlook Macro to get Exchange Info from Mail
 
Any chance of an update on this? I have not been ale to find any information
on the Web or in the Help file....

Dmitry Streblechenko April 20th 10 06:15 PM

Outlook Macro to get Exchange Info from Mail
 


--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"_M_a_t_t_" wrote in message
...
The contact does not exist in the local address book. What I want to
access
is the contact information you can access when right clicking on From name
and choosing Outlook Properties. With non exchange senders, you Display
name, E-mail address, E-mail type, and Internet format. When its an
Exchange
mail, you get (provided entered), shipping address, phone number(s),
country
etc. Its this information I'd like to access directly from the Email (as
the
contact isn't in the local address book, and I'm reading in, parcing and
displaying information from the email). However, I can not install
additional
plug-ins. I need to be able to do this with what Outlook already has. I'm
assuming this can be done with Microsoft CDO 1.21 Reference and/or MAPI,
but
I need an example of how to access the information from the email and
contact
in 1 loop (or perhaps via a sub function called from the main loop. Again
I'm
currently using this formation to read out the information from the Email:

Dim olkItem As Outlook.MailItem
For Each olkItem In Application.ActiveExplorer.Selection
'Read the info and enter it into the dialog
'Example info: MsgBox olkItem.SenderEmailAddress
Next

And this works fine (as long as only 1 mail is selected, more then one
causes problems, since each would be processed, but only the last selected
would actually be displayed).

Matt

"Dmitry Streblechenko" wrote:

So d oyo uwant to access EX specific properties of a contact that was
create
in the hContacts folder from one of the GAL entries?
Or EX properties of a message sender/recipient?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-





Dmitry Streblechenko April 20th 10 06:39 PM

Outlook Macro to get Exchange Info from Mail
 
Create an instance of the MAPI.Session object,
set Session.MAPIOBJECT property to Namespace.MAPIOBJECT from OOM
Reopen the message in CDO 1.21 using Session.GetMessage and the valeu of teh
MailItem.EntryID
Read the Message.Sender property (returnsd AddressEntry).
Use AddressEntry.Fields[] to access the required propeties - you can get the
props tags from OutlookSpy (e.g. click IMAPISession | QueryIdentity)

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"_M_a_t_t_" wrote in message
...
The contact does not exist in the local address book. What I want to
access
is the contact information you can access when right clicking on From name
and choosing Outlook Properties. With non exchange senders, you Display
name, E-mail address, E-mail type, and Internet format. When its an
Exchange
mail, you get (provided entered), shipping address, phone number(s),
country
etc. Its this information I'd like to access directly from the Email (as
the
contact isn't in the local address book, and I'm reading in, parcing and
displaying information from the email). However, I can not install
additional
plug-ins. I need to be able to do this with what Outlook already has. I'm
assuming this can be done with Microsoft CDO 1.21 Reference and/or MAPI,
but
I need an example of how to access the information from the email and
contact
in 1 loop (or perhaps via a sub function called from the main loop. Again
I'm
currently using this formation to read out the information from the Email:

Dim olkItem As Outlook.MailItem
For Each olkItem In Application.ActiveExplorer.Selection
'Read the info and enter it into the dialog
'Example info: MsgBox olkItem.SenderEmailAddress
Next

And this works fine (as long as only 1 mail is selected, more then one
causes problems, since each would be processed, but only the last selected
would actually be displayed).

Matt

"Dmitry Streblechenko" wrote:

So d oyo uwant to access EX specific properties of a contact that was
create
in the hContacts folder from one of the GAL entries?
Or EX properties of a message sender/recipient?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-





_M_a_t_t_[_2_] April 21st 10 05:40 AM

Outlook Macro to get Exchange Info from Mail
 
Thanks for the update Dmitry, however I do not understand what you are
refering to nor how to do what you have stated (I say that I need an example
previously) ..... Any chance you can post a small example?


Dmitry Streblechenko April 22nd 10 06:59 AM

Outlook Macro to get Exchange Info from Mail
 
I don't have CDO 1.21 installed here, so the script below uses Redemption


set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
for each Item in Application.ActiveExplorer.Selection
set RDOItem = Session.GetMessagefromID(Item.EntryID)
set Sender = RDOItem.Sender
if not (Sender Is Nothing) Then
MsgBox Sender.City
end if
next

The next script is using CDO 1.21, but I did not have a chance to actually
test it

set Session = CreateObject("MAPI.Session")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
for each Item in Application.ActiveExplorer.Selection
set CDOItem = Session.GetMessage(Item.EntryID)
set Sender = CDOItem.Sender
if not (Sender Is Nothing) Then
MsgBox Sender.City
end if
next

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"_M_a_t_t_" wrote in message
...
Thanks for the update Dmitry, however I do not understand what you are
refering to nor how to do what you have stated (I say that I need an
example
previously) ..... Any chance you can post a small example?




_M_a_t_t_[_2_] April 23rd 10 08:33 AM

Outlook Macro to get Exchange Info from Mail
 
Thanks Dmitry, regretfully the CDO example doesn't work... I get an error on
MAPIOBJECT: "Method or data member not found (Error 461)"....


Dmitry Streblechenko April 26th 10 07:08 PM

Outlook Macro to get Exchange Info from Mail
 
Do you get that error on reading the Application.Session.MAPIOBJECT or
setting the Session.MAPIOBJECT property.
Where does your code run?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"_M_a_t_t_" wrote in message
...
Thanks Dmitry, regretfully the CDO example doesn't work... I get an error
on
MAPIOBJECT: "Method or data member not found (Error 461)"....




_M_a_t_t_[_2_] April 27th 10 09:53 AM

Outlook Macro to get Exchange Info from Mail
 
I get the error on:
Session.MAPIOBJECT = Application.Session.MAPIOBJECT

Regretfully the help isn't 'helpful' here, since I can't find any
information about this, or what would be 'correct'.....


Dmitry Streblechenko April 28th 10 12:21 AM

Outlook Macro to get Exchange Info from Mail
 
That line contains two statements. One is reading the property. Another one
is setting it. Can you break that line in two to see which one fails?

set temp = Application.Session.MAPIOBJECT
Session.MAPIOBJECT = temp

Is this Access? If, Session intrinsic variable points to an Access object.
Rename the Session variable in the script to somethign like CDOSession.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"_M_a_t_t_" wrote in message
...
I get the error on:
Session.MAPIOBJECT = Application.Session.MAPIOBJECT

Regretfully the help isn't 'helpful' here, since I can't find any
information about this, or what would be 'correct'.....




_M_a_t_t_[_2_] April 30th 10 05:31 AM

Outlook Macro to get Exchange Info from Mail
 
Again, where does your code run?
I'm trying to get this working on Outlook 2003 (11.8313.8221) SP3.

Another words, Outlook VBA (Alt-F11 in Outlook).

Dmitry Streblechenko April 30th 10 06:39 PM

Outlook Macro to get Exchange Info from Mail
 
Session is also an intrinsic variable in VBA. Try the following (it does
work)

PR_LOCALITY = &H3A27001E

Set cdoSession = CreateObject("MAPI.Session")

Set temp = Application.Session.MAPIOBJECT

cdoSession.MAPIOBJECT = temp

For Each Item In Application.ActiveExplorer.Selection

Set CDOItem = cdoSession.GetMessage(Item.EntryID)

Set Sender = CDOItem.Sender

If Not (Sender Is Nothing) Then

Set Field = Sender.Fields.Item(PR_LOCALITY)

If Not (Field Is Nothing) Then

MsgBox Field.Value

End If

End If

Next


--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"_M_a_t_t_" wrote in message
...
Again, where does your code run?

I'm trying to get this working on Outlook 2003 (11.8313.8221) SP3.

Another words, Outlook VBA (Alt-F11 in Outlook).




_M_a_t_t_[_2_] May 5th 10 08:42 AM

Outlook Macro to get Exchange Info from Mail
 
Hopfully this reply is posted. Tried several time, and for some reason its
not posting.

When I run the code you posted above I get:
Compile error:

Assignment to constant not permitted

on this line:
Set CdoSession = CreateObject("MAPI.Session")

Ken Slovak - [MVP - Outlook] May 5th 10 01:50 PM

Outlook Macro to get Exchange Info from Mail
 
Try setting a reference to CDO.DLL in the references for your VBA project.

--
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
...
Hopfully this reply is posted. Tried several time, and for some reason its
not posting.

When I run the code you posted above I get:
Compile error:

Assignment to constant not permitted

on this line:
Set CdoSession = CreateObject("MAPI.Session")



_M_a_t_t_[_2_] May 6th 10 07:17 AM

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.......


_M_a_t_t_[_2_] May 6th 10 07:18 AM

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......

_M_a_t_t_[_2_] May 6th 10 07:19 AM

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......

_M_a_t_t_[_2_] May 6th 10 08:46 AM

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.

Ken Slovak - [MVP - Outlook] May 6th 10 02:54 PM

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.




All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com