473,468 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Get Outlook Out of Office status using C#

fayazmd
41 New Member
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 8261
Plater
7,872 Recognized Expert Expert
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 New Member
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 Recognized Expert Expert
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 New Member
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.