?
Solved

Outlook 2010 default message on shared calendar

Posted on 2014-10-28
15
Medium Priority
?
300 Views
Last Modified: 2014-10-30
I have a shared outlook 2010 calendar that I would like to have a default message in the body when anybody schedules a new appointment. Any thoughts...Thanks
0
Comment
Question by:shieldsco
[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
  • 8
  • 7
15 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 40409843
Hi, shieldsco.

If you can publish a form to your Exchange server's organizational forms library, then you should be able to do this with a custom form.  If that's not possible, then the only solution I can think of is to use a macro.  That macro would have to be installed on every computer that would ever create an item on the shared calendar.
0
 

Author Comment

by:shieldsco
ID: 40410900
Any other thoughts......
0
 

Author Comment

by:shieldsco
ID: 40411541
What would the macro look like
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 40411622
The code will look like this.  This code must go in the ThisOutlookSession module in Outlook.

This code works by trapping the ItemAdd event that fires each time an item is added to the calendar.  That event fires when the item is saved, not when the item is first created.

Dim WithEvents olkCal As Outlook.Items

Private Sub Application_Quit()
    Set olkCal = Nothing
End Sub

Private Sub Application_Startup()
    'This line will change depending on where the shared calendar is (i.e. public folder versus mail account)
    Set olkCal = Session.GetDefaultFolder(olFolderCalendar).Items
End Sub

Private Sub olkCal_ItemAdd(ByVal Item As Object)
    'On the next line replace "Your text goes here" with the text you want to insert in each appointment
    Item.Body = "Your text goes here."
    Item.Save
End Sub

Open in new window

0
 

Author Comment

by:shieldsco
ID: 40412092
Works good but how do I change the code to a shared calendar named Conference Call
0
 

Author Comment

by:shieldsco
ID: 40412106
Its in the folder Conference Call
0
 
LVL 76

Expert Comment

by:David Lee
ID: 40412316
Is that another calendar in your profile, a calendar in another mailbox, or a calendar in a public folder?
0
 

Author Comment

by:shieldsco
ID: 40412329
In my profile
0
 
LVL 76

Expert Comment

by:David Lee
ID: 40412413
If this is a sub-calendar under your main calendar, then change this line

Set olkCal = Session.GetDefaultFolder(olFolderCalendar).Items

to

Set olkCal = Session.GetDefaultFolder(olFolderCalendar).Folders("Conference Call").Items

Also, since the calendar is in your profile, you'll  only want the code on one computer.  But, this also introduces a couple of problems.  If the code is on multiple computers and those computers are all on when an item is added, then each would add the text to the item.  On the other hand, if the computer with the code isn't on when someone adds an item, then the text won't get added to the body at all.
0
 

Author Comment

by:shieldsco
ID: 40412447
How can I also put the message on both my default and shared calendar
Set olkCal = Session.GetDefaultFolder(olFolderCalendar).Items and Set olkCal = Session.GetDefaultFolder(olFolderCalendar).Folders("Conference Call").Items
0
 
LVL 76

Expert Comment

by:David Lee
ID: 40412847
This will monitor both calendars, inserting text into any appointment/meeting added to either one.

Dim WithEvents olkCal1 As Outlook.Items
Dim WithEvents olkCal2 As Outlook.Items

Private Sub Application_Quit()
    Set olkCal1 = Nothing
    Set olkCal2 = Nothing
End Sub

Private Sub Application_Startup()
    Set olkCal1 = Session.GetDefaultFolder(olFolderCalendar).Items
    Set olkCal2 = Session.GetDefaultFolder(olFolderCalendar).Folders("Conference Call").Items
End Sub

Private Sub olkCal1_ItemAdd(ByVal Item As Object)
    InsertText Item
End Sub

Private Sub olkCal2_ItemAdd(ByVal Item As Object)
    InsertText Item
End Sub

Sub InsertText(Item As Object)
    'On the next line replace "Your text goes here" with the text you want to insert in each appointment
    Item.Body = "Your text goes here."
    Item.Save
End Sub

Open in new window

0
 

Author Comment

by:shieldsco
ID: 40413011
One last question ... how would I change to a public folder... Thanks
0
 
LVL 76

Expert Comment

by:David Lee
ID: 40413096
To open a calendar in a public folder use something like this

Set olkCal = Session.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("Your Folder Name")
0
 

Author Closing Comment

by:shieldsco
ID: 40413292
Thanks ... Great Job
0
 
LVL 76

Expert Comment

by:David Lee
ID: 40413435
You're welcome!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

777 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