Solved

OOO message to activate automatically based on Calendar events

Posted on 2015-02-07
8
90 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS accesss using VBA to change a default value 5 30
highlight duplicate entry 16 30
vba excel2010 and 2013 2 38
Update As Well As Add 6 39
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

867 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

17 Experts available now in Live!

Get 1:1 Help Now