A
Alex
Get the Name and Phone Number of the Current Windows User from Outlook
2003
Hello All,
I have asked the question yesterday here:
http://groups.google.com/group/micr...read/thread/be5f6b36fdef1345/24abc34416f227e4
I got a lot of help there, but I may posted in the wrong place. I
also realized that I am using Outlook 2003. The new outlook object
model 2007 does not work. I may need to use API.
Here is an updated description.:
I am writing a simple .NET (C#) application. It needs to "automatic"
get the Name (last, first) and phone number of the current Windows
user.
The name and phone number can obviously be retrieved from the
Outlook.
I can safely assume:
(1) Outlook 2003 is installed.
(2) The phone number of the current Windows user is in the Outlook
profile.
In Visual Studio 2005, after "Adding Reference"--> COM --> Microsoft
Outlook Object Libary 11.0
I can do something like:
2. After add Outlook Object references, I can do something like:
Outlook._Application olApp = new Outlook.ApplicationClass();
Outlook.NameSpace oNS = olApp.GetNamespace("MAPI");
Outlook.AddressList oAL = oNS.AddressLists["Global Address List"];
Outlook.AddressEntries oAEs = oAL.AddressEntries;
In this way, I can get the AddressEntries. But nowhere can I find
business phone number. Again, I am using Outlook 2003
Your input is highly appreciated.
Thanks.
Alex
2003
Hello All,
I have asked the question yesterday here:
http://groups.google.com/group/micr...read/thread/be5f6b36fdef1345/24abc34416f227e4
I got a lot of help there, but I may posted in the wrong place. I
also realized that I am using Outlook 2003. The new outlook object
model 2007 does not work. I may need to use API.
Here is an updated description.:
I am writing a simple .NET (C#) application. It needs to "automatic"
get the Name (last, first) and phone number of the current Windows
user.
The name and phone number can obviously be retrieved from the
Outlook.
I can safely assume:
(1) Outlook 2003 is installed.
(2) The phone number of the current Windows user is in the Outlook
profile.
In Visual Studio 2005, after "Adding Reference"--> COM --> Microsoft
Outlook Object Libary 11.0
I can do something like:
2. After add Outlook Object references, I can do something like:
Outlook._Application olApp = new Outlook.ApplicationClass();
Outlook.NameSpace oNS = olApp.GetNamespace("MAPI");
Outlook.AddressList oAL = oNS.AddressLists["Global Address List"];
Outlook.AddressEntries oAEs = oAL.AddressEntries;
In this way, I can get the AddressEntries. But nowhere can I find
business phone number. Again, I am using Outlook 2003
Your input is highly appreciated.
Thanks.
Alex