Solved

OOO message to activate automatically based on Calendar events

Posted on 2015-02-07
8
130 Views
Last Modified: 2016-02-11
I use Office 2010 and our company has Exchange Server 2007. Is it possible to script so OOO is activated based on the events in the calendar event. For e.g I have marked a day as Away for meeting on Tuesday. Would it be possible to activate OOO automatically on Tuesday?
0
Comment
Question by:Advait Kawthalkar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 69

Expert Comment

by:Qlemo
ID: 40610776
If you can associate having Outlook opened directly to not being OoO and vice versa, using Outlook startup and shutdown events is much easier to do and described in http://www.experts-exchange.com/A_3487-Automating-Out-of-Office-in-Outlook.html
0
 

Author Comment

by:Advait Kawthalkar
ID: 40611522
Thanks Qlemo for the info. I had seen that link before. But in our office people do close their outlook daily and take their laptops. So that solution is not viable.

Regards.
myinfo
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 40612615
You still need a trigger to check for appointments. This can be closing Outlook, or a manually triggered macro. Or a scheduled task.

Then you need to set a time span to check for: on Friday, a Monday appointment should lead to OoO on Friday after business hours.

And there is always only a singe OoO. Successive appointments need to result in a cummulative OoO message.

All has to happen on the client PC. Exchange 2007 cannot be used to script that, AFAIK.

See? This is no simple topic. Sounds easier than it is ;-).
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Advait Kawthalkar
ID: 40615956
Yes I agree that this is not easy at all and that's the reason to post it on Experts-exchange . ;-)
0
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 40617124
Seems as if we cannot do sophisticated stuff with VBA. We can switch OoO on or off, and that's it. I managed once to change the message body, but that's it. For reference, this is what I have, looking for the next day only:
Public Sub CheckNextOoO()
Dim apt As AppointmentItem
Dim apts As Items
  Set apts = Session.GetDefaultFolder(olFolderInbox).Parent.Folders("Calendar").Items
  apts.Sort "[Start]"
  For Each apt In apts
    If apt.Start > Now Then
      Exit For
    End If
  Next
  If apt.Start = today + 1 Then
    OutOfOffice True, "I'm out of office on " & CDate(Int(apt.Start))
  End If
End Sub

Sub OutOfOffice(bolState As Boolean, Optional text As String)
Const PR_OOF_STATE = "http://schemas.microsoft.com/mapi/proptag/0x661D000B"
Dim olkIS As Outlook.Store, olkPA As Outlook.PropertyAccessor

  Dim oStorageItem As Outlook.StorageItem
Set oStorageItem = Session.GetDefaultFolder(olFolderInbox).GetStorage("IPM.Note.Rules.OofTemplate.Microsoft", olIdentifyByMessageClass)
  oStorageItem.Body = text
  oStorageItem.Save

  For Each olkIS In Session.Stores
    If olkIS.ExchangeStoreType = olPrimaryExchangeMailbox Then
        Set olkPA = olkIS.PropertyAccessor
        olkPA.SetProperty PR_OOF_STATE, bolState
    End If
  Next
  Set olkIS = Nothing
  Set olkPA = Nothing
End Sub

Open in new window

0
 

Author Comment

by:Advait Kawthalkar
ID: 40757936
Actually this is not the complete solution am looking for. Anyways.
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 40758011
Sorry, but this is not worth a "C" only. I've told you all I know, even tried out scripting, and maybe "You can't do that" is the correct answer.

No other Expert posted, which might be because
a) I'm correct, it cannot be done
b) you never responded with details to http:#a40612615
c) you neglected the question, despite you've received reminder mails with instructions how to proceed. At least you should haver requested attention to allow the Moderators to try to help you getting a broader audience.

But it isn't too late, you can still request attention, ask for reopening and sending out an alert for more Experts, if you are interested. Or I can do that (being a Topic Advisor).
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question