Solved

Outlook 2010 default message on shared calendar

Posted on 2014-10-28
15
287 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 76

Accepted Solution

by:
David Lee earned 500 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Find out what you should include to make the best professional email signature for your organization.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 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