473,383 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Get Outlook Out of Office status using C#

fayazmd
41
I am working in a web application where i am sending mails to employees. I have to send mails to persons whose outlook out of office is set to false. And I need to know one's out of office status. For that I used the following code. By using this I am getting my outlook out of office status. But how can I get other employees Out of office staus? My code is

Expand|Select|Wrap|Line Numbers
  1.  OutLook.NameSpace oNS;
  2.         OutLook.Stores oStores;
  3.         //OutLook.Store oStr;
  4.         OutLook.PropertyAccessor oPrp;
  5.  
  6.         OutLook._Application outlookObj = new OutLook.Application();
  7.  
  8.         oNS = outlookObj.GetNamespace("MAPI");
  9.         oStores = oNS.Stores;
  10.  
  11.  
  12.         foreach(OutLook.Store oStr in oStores)
  13.         {
  14.             if(oStr.ExchangeStoreType == Microsoft.Office.Interop.Outlook.OlExchangeStoreType.olPrimaryExchangeMailbox)
  15.             {
  16.                 oPrp = oStr.PropertyAccessor;
  17.                 bool OutOfOffice = (bool) oPrp.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x661D000B");                                
  18.             }
  19.         }
May 25 '08 #1
4 8246
Plater
7,872 Expert 4TB
Unless you are able to provide their credentials to login, I am not sure you can do that.

Why not send emails to all of them have something in place to intercept the "out of office" auto-reply and ignore it?
May 27 '08 #2
fayazmd
41
Hi Plater,

We have microsoft office communicator. If any body, sets out of office, it gets reflected in communicator. How this is possible, if credentilas are required to know the status.

Unless you are able to provide their credentials to login, I am not sure you can do that.

Why not send emails to all of them have something in place to intercept the "out of office" auto-reply and ignore it?
Jun 4 '08 #3
Plater
7,872 Expert 4TB
Well there is bound to be a like "administrator" credential into the communicator system that can view all the statuses.
I am unfamiliar with communicator and that whole setup thought.
Jun 4 '08 #4
fayazmd
41
Any way Thanks for try!

Well there is bound to be a like "administrator" credential into the communicator system that can view all the statuses.
I am unfamiliar with communicator and that whole setup thought.
Jun 10 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Max | last post by:
Hi, I would like to have a button and a combo box with options to select various versions of Microsoft Outlook: 2002, 2003. The user selects the email client and clicks the button. The only...
10
by: John | last post by:
Hi When I open a new outlook email from vb.net, sometimes outlook is very slow to appear or occasionally outlook freezes completely. I am targeting mixed office2000/xp environments so I am...
5
by: Imry | last post by:
Is there a way to programatically add items to the outlook task list using VB ..net?
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
2
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
3
by: mwolowski | last post by:
Hello, I'd like to add tasks, appointments, etc using c# to outlook For example i added reference using OutLook = Microsoft.Office.Interop.Outlook; and the code: 1. ---------------------...
1
by: =?Utf-8?B?cm9i?= | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
1
by: arnott | last post by:
hi all, I am writing a add-in for Outlook 2007 using C# and VSTO ( Visual Studio 2008). When the user clicks on each mailitem in the inbox (or any folder) in the active explorer window, the...
4
by: musicloverlch | last post by:
Hi all, I have a database being used by 30 people and is split between the backend and frontend. The database has the ability to send e-mails through Outlook and I have even put Redemption on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.