Solved

OOO message to activate automatically based on Calendar events

Posted on 2015-02-07
8
99 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 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
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…

810 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