Solved

OOO message to activate automatically based on Calendar events

Posted on 2015-02-07
8
80 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
  • 4
  • 3
8 Comments
 
LVL 68

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 68

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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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 68

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 68

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now