?
Solved

OOO message to activate automatically based on Calendar events

Posted on 2015-02-07
8
Medium Priority
?
194 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 70

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 70

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
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

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 70

Accepted Solution

by:
Qlemo earned 2000 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 70

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

Industry Leaders: 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!

Question has a verified solution.

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

Use Windows Task Scheduler to print a Word document weekly so your printer ink won't dry out.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

752 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