TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sabir Hussain
NA
3
1.5k
How do I count the number of accounts present in Microsoft Outlook 2010?
Jul 18 2011 6:06 AM
I'm trying to count number of accounts present in outlook. For the first time it shows count = 0 as there is no account configured in Outlook.
Then I configure an account and tried to count the number of accounts configured within the same appliction. It shows zero every time but when I restart the application and the account is still configured then it shows 1. Strange outcome, it should show count = 1 without restarting the application.
This is my code
OutLook.Application Objoutlook = null;
OutLook.NameSpace objns = null;
OutLook.Accounts objaccounts = null;
Objoutlook = new OutLook.Application();
objns = Objoutlook.GetNamespace("MAPI");
// The Namespace Object (Session) has a collection of accounts.
objaccounts = Objoutlook.Session.Accounts;
messagebox.show (objaccounts.count);
Plz reply it's urgent
Reply
Answers (
2
)
Check my Code
Popup in ASP.NET