Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / January 2005

Tip: Looking for answers? Try searching our database.

Getting MailBox Properties using Outlook Object Model ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
W Akthar - 05 Jan 2005 12:10 GMT
Hi,

How can get access the mailbox properties using the
outlook object model?
I need to record to SQL Server when appointments are made
and emails are sent to certain people using a dotnet
addin I have created but need to get hold of the users
profile, so I can store this information in SQL Server
against this user.

Any ideas ??
Sue Mosher [MVP-Outlook] - 05 Jan 2005 13:57 GMT
No, the Outlook object model contains no information on user mail profiles.
It might help if you explained just what information you're trying to store.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hi,
>
[quoted text clipped - 7 lines]
>
> Any ideas ??
W Akthar - 05 Jan 2005 16:59 GMT
I need to get hold of the outlook user name.

Outlook.Application olApp;
Outlook._NameSpace olNS = null;

olApp = (Outlook.Application)applicationObject;
olNS = olApp.GetNamespace("MAPI");
if (olNS != null)
{
 string currentUser = olNS.CurrentUser.Name;
}

Is this correct??

>-----Original Message-----
>No, the Outlook object model contains no information on user mail profiles.
[quoted text clipped - 13 lines]
>
>.
Sue Mosher [MVP-Outlook] - 05 Jan 2005 18:33 GMT
Yes, but (a) that will trigger security prompts in many Outlook application
environments and (b) you may get unexpected results if the user has multiple
accounts or only POP/IMAP accounts. If you want the name on the Exchange
mailbox, walk up the folders hierarchy from the Inbox using the
Namespace.GetDefaultFolder method then the MAPIFolder.Parent object
property.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

>I need to get hold of the outlook user name.
>
[quoted text clipped - 32 lines]
>>
>>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.