none
Open the options menu in Outlook 2010 RRS feed

  • Question

  • I deal with people in multiple timezones. In order to make setting up new meetings easier, i want an easy way to switch the secondary timezone in outlook.

    I've tried setting the registry key, but getting the calendar to refresh is problematic.

    What i'm thinking now is that i will use sendkeys to simulate opening the options menu, then changing the timezone. I just don't know how to get the calendar options menu, where you right click on the times in the calendar and select 'change time zone'.

    Any clues ? Thanks.

    Tuesday, May 27, 2014 7:06 AM

All replies

  • Hello,

    The Outlook object model doesn't provide any property or method for setting time zones. The CurrentTimeZone property in traduced with Outlook 2007 is read-only. It returns a TimeZone value that represents the current Windows system local time zone. The TimeZones collection is read-only, and serves the purpose of enumerating time zones supported by Microsoft Windows and thus Outlook. Its value is accessible through the property Application.TimeZones and is based on the data stored in  the Windows registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.

    You may try to use the ExecuteMso method of the CommandBars class for executing the control identified by the idMso parameter. Here is what MSDN states:  

    This method is useful in cases where there is no object model for a particular command.  Works on controls that are built-in buttons, toggleButtons and splitButtons.  On failure it returns E_InvalidArg for an invalid IdMso, and E_Fail for controls that are not enabled or not visible.

    Note, if you develop a form region, you can use the OlkTimeZoneControl control.

    Tuesday, May 27, 2014 7:51 AM
  • Thanks Eugene, i will have a look into the the ExecuteMso command, it's not one i've looked at so far.

    As you mention it's for built-in buttons, toggleButtons and splitButtons, but not the context menu, although i might be able to find an alternative path to the options i need.


    Tuesday, May 27, 2014 8:27 AM
  • Also you may try to use Accessibility API.
    Tuesday, May 27, 2014 11:21 AM