LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel vba interface with outlook (office 2000)

I'm writing (or trying to write) some code in Excel VBA to extract the
current logged-in user's email address from Outlook. I figured out how
to go through the namespace and access the currentuser:

Sub test()

Dim a As Recipient
Set a = Outlook.Application.GetNamespace("MAPI").currentUs er

MsgBox a.AddressEntry.Address

End Sub

This returned a cryptic string that I can parse and bring to a usable
email address, but the problem is that it comes up with message saying
that it needs special permission to access the information. The error
box that comes up is: "A program is trying to access e-mail addresses
you have stored in Outlook. Do you want to allow this?" I could't find
anything in the security informatino to stop that from coming up. I
need this to be seamless so it can fit in an automated process. Is this
the best way to retrieve an email address from a login, and if so, how
do I stop that message from coming up?


---
Message posted from http://www.ExcelForum.com/

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need dynamic name range in Excel for Outlook interface John E. Excel Worksheet Functions 3 September 17th 06 07:21 AM
Office 2000/Office 2003 Excel not printing landscape vise versa BAHTTEXT in English text Setting up and Configuration of Excel 1 April 17th 06 01:37 PM
I cannot edit cell format in Excel 2000 (Part of office 2000)! Brett Excel Discussion (Misc queries) 1 April 12th 06 05:58 PM
need help with Outlook/Excel interface Brainless_in_Boston New Users to Excel 3 February 24th 06 07:36 PM
Excel Programs developed in Office 2000 on Windows 2000 Trooper Excel Discussion (Misc queries) 4 March 12th 05 11:09 PM


All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"