none
VBA script for custom Outlook 2010 calendar "first day of week" RRS feed

  • Question

  • I need Outlook 2010 to use "week starting with the Saturday before Jan 1" as "first week of year" to match our company payroll calendar. (For example, Saturday 12/26/2015-Sunday 1/3/2016 would be "first week of 2016".) Is there a way to do this in a VBA script?

    -Thanks, zogg

    Monday, April 27, 2015 8:31 PM

Answers

  • Hello zogg,

    The settings are stored in the registry at


    HKCU\Software\Microsoft\Office\15.0\Outlook\Options\Calendar

    where 15.0 stands for Outlook 2013.

    Make changes in the Outlook settings and see which registry values change and in what way depending on the settings you change. 

    Also take a look at the How can I get the work week and day number in VBA (outlook 2010)? page which states the following:

    WW = Format(Now, "ww") & "." & Weekday(Now, vbMonday)

    The "Format" function returns an expression from a string formatted with the provided "format" argument (ww in this case, which returns the week of the year) and the Weekday() function returns the numbered day of the week where the first day is a VBDayOfWeek enumeration provided as the second argument (vbMonday in this case).

    Tuesday, April 28, 2015 4:49 AM

All replies

  • Hello zogg,

    The settings are stored in the registry at


    HKCU\Software\Microsoft\Office\15.0\Outlook\Options\Calendar

    where 15.0 stands for Outlook 2013.

    Make changes in the Outlook settings and see which registry values change and in what way depending on the settings you change. 

    Also take a look at the How can I get the work week and day number in VBA (outlook 2010)? page which states the following:

    WW = Format(Now, "ww") & "." & Weekday(Now, vbMonday)

    The "Format" function returns an expression from a string formatted with the provided "format" argument (ww in this case, which returns the week of the year) and the Weekday() function returns the numbered day of the week where the first day is a VBDayOfWeek enumeration provided as the second argument (vbMonday in this case).

    Tuesday, April 28, 2015 4:49 AM
  • The only valid registry values for that key reflect the pull-down settings. Not helpful.

    For the next Outlook, Microsoft should allow more flexibility for setting 1st week of year, and allow simultaneous week of year displays similar to time zones. For example, USG fiscal year starts Oct 1 and my company's payroll year starts last Sat in Dec. It would be nice to have simultaneous displays of the two week #s.

    Monday, May 4, 2015 8:12 PM
  • I'd suggest leaving your feedback on the Customer Feedback for the Office Developer Platform page.
    Monday, May 4, 2015 8:32 PM