Solved

Outlook calendar VBA - find time zone of item

Posted on 2016-09-06
2
103 Views
Last Modified: 2016-09-06
Does anyone have the VBA code to open the outlook calendar and access the time zone of existing appointments?

 If this was Excel I'd find it in a heartbeat with VBA but don't understand the object model for Outlook and have been exasperated every time I go near it

While I was in Hawaii all the new calendar appointments I created got set to that time zone. Now back in the Eastern time zone those appointments show in the wrong time and evening appointments show as the next day. A List view does not have time zone as a viewable column.

Steve in NH
0
Comment
Question by:Steve Moland
[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
2 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
ID: 41786220
Here's some code to get you started:

Sub cal_test()

Dim myNamespace As Outlook.NameSpace
 
Set myNamespace = Application.GetNamespace("MAPI")
Set my_cal = myNamespace.GetDefaultFolder(olFolderCalendar).Items
 
For Each cal_item In my_cal
  MsgBox "subject: " & cal_item.subject & vbCrLf & "start: " & cal_item.Start & vbCrLf & "end: " & cal_item.End & vbCrLf & "start timezone: " & cal_item.StartTimeZone & vbCrLf & "end timezone: " & cal_item.EndTimeZone
Next

End Sub

Open in new window


To finish it off yourself, probably best set an IF statement for the appointments made during a specific time period.

Also, Outlook objects are always well documented by MS: https://msdn.microsoft.com/en-us/library/office/ff862177.aspx
0
 

Author Closing Comment

by:Steve Moland
ID: 41786358
PERFECT clean example which helped me get the job done. Now I will not shy away from other outlook stuff I run the other way from.  Also thanks for the link to  the documentation.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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: …

738 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