Add week numbers to Outlook for Mac’s calendar

Week numberUpdate: Beginning with the Office for Mac 14.2.0 Update (SP2) Microsoft added week numbers to Outlook for Mac. Enable them first under Outlook menu –> Preferences… –> Calendar. They appear in either Week or Work week view next to the date range above the calendar.

Three years ago I posted a script to add week numbers to Entourage. I’ve updated that script for Outlook for Mac and made some improvements based on the comments I received. Download Add Week Numbers 3.0.

Outlook for Mac itself does not have a feature to display week numbers on its calendar. If folks would like to see this feature added then please let Microsoft know using the Send Feedback tool under the Help menu of any Office for Mac application. For now, this AppleScript works on the same premise as the original. It adds a new calendar event to each week that displays both the week number and the ordinal date (day 1-365 of the year).

This script improves on the original in a few ways:

  1. Most importantly, week numbering is calculated based on ISO standards for calculating week numbers.
  2. Users can select which day to display week numbers. This is useful in countries or work environments where Monday is typically the first day of the week or work week. It’s useful to anyone else who simply chooses to display week numbers on a different day, such as Wednesday, for easier viewing.
  3. Users can also select which calendar to display week numbers. Since Outlook allows for multiple calendars, I suggest creating one just for week numbers so that week numbers can be toggled on and off. More on that later.
  4. Dates are calculated in format MM-DD-YYYY or DD-MM-YYYY, depending on the Mac’s International settings. This should accommodate most country date formats.
  5. Users can customize the words “Week” and “Day” at the beginning of the script to display these words in their own languages.

Installation

To install this script select About This Menu… from the AppleScript menu in Outlook for Mac.

About This Menu

Click the Open Folder button in the dialog to open the Outlook Script Menu Items folder Finder.

Open Folder

Drag the the Add Week Numbers.scpt file to this folder to move or copy it there. The script will appear immediately in Outlook’s AppleScript menu without needing to restart.

Using Add Week Numbers

Once installed, select Add Week Numbers from Outlook’s AppleScript menu.

Add Week Numbers

Enter a year and click the OK button.

Enter a year

Next, select a calendar to display the week numbers. What I’ve done below is create a new calendar in my Exchange account called “Display Week Numbers”. This gives me two advantages, which I’ll describe later. Select this or any other calendar and click the OK button.

Select a calendar

Finally, select a day of the week to display the week numbers. Most folks will probably prefer to display them on the first day of the week or first day of the work week. Any day is acceptable.

Select a day of the week

In a few seconds the selected calendar will display the week days.

Calendar with week numbers

Using a dedicated calendar to display week numbers

Consider creating a new calendar just to display week numbers. This offers two advantages:

  1. The week numbers can be toggled off and on. You can display them when you want them and hide them when you don’t.
  2. If you add them to a dedicated Exchange calendar then they will sync to an iPhone or other iOS device where the calendar can be toggled off and on as well.

To create a dedicated calendar, first click the Calendar button in the navigation pane on the left to switch to Calendar view. Next, select either On My Computer or an Exchange account in the Navigation pane on the left. Select File menu –> New –> Folder.

Create new folder

This will create a new calendar under the account ready to rename. Call it something like “Display Week Numbers”.

Display week numbers calendar

When running the script, choose this as the calendar to display week numbers. Uncheck it to hide week numbers on the calendar.

Exchange users will notice the week numbers when viewing the calendar month and selecting the day that holds the week number event.

Week numbers on iPhone

To hide the week numbers, click the Calendars button in the upper left corner and deselect the Display Week Numbers calendar by removing the checkmark.

Deselect week numbers on iPhone

Customizing for different languages

By default the script uses the English words “Week” and “Day” when displaying the week numbers and day numbers. These words can be changed to equivalent words in any other language by changing the following two lines near the beginning of the script:

-------------------------------------------------------------------------
-- Customize words "Week" and "Day to your language so
-- that your calendar items are more easily readable.
-------------------------------------------------------------------------

 

set languageWeek to "Week"
set languageDay to "Day"

Download Add Week Numbers 3.0.

See also: Add week numbers to the Entourage calendar

Share this:
  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • StumbleUpon
  • Google Bookmarks
  • PDF
  • Print

26 comments to Add week numbers to Outlook for Mac’s calendar

  • Terje

    Genius!
    You saved my day (or should I say week)!
    Thank you!

    • gerard berendsen

      Hi William,
      I installed the script, as a result, week and day number arrive in the calendar, fine. However, it starts with week number 1 and day number 1 on today, also when I put the cursor on week 1 before adding the script.

      How to do it correct?
      How can I remove the current script that is wrong?

      rgds Gerard

  • Jeff Mc.

    EXCELLENT! I’m amazed that I haven’t thought of this before..

    FWIW, I’ve hacked up the script a bit and added the ability to ask the user if the event should only be created for the duration of the day chosen, or for the duration of the entire week. If the week is created, the “end time” is extended to 7 days, minus 1 second (11:59:59). It also changes the display from “Week XX – Day NN” to “Week XX – Days XXX – YYY”.

    The nice bit about this, is that it creates a “Bar” on your all day events view, and regardless of what “view” you are in (day view, week, month) you’ll always know the week number.

    I’d be happy to share, just don’t know where to send it too. It’s also the first time I’ve ever looked at AppleScript, but in my (limited) tests, it appears to work just fine. :)

    • Excellent!

      If you want to submit it via our Contact form then I can add it to the blog post as an alternate script. Please be sure to state that you’re willing or unwilling to support your script. It you wish to provide support then provide an email address and we’ll make sure it gets obfuscated accordingly.

  • Mezekiss

    Hello,

    Your script is very excellent!!! I would like to known, how find you the command lines? Because i would to link *.pst in Outlook 2011.

    Thank you very much.

    • Thank you for the kind words but we cannot offer personal help through comments on our site. Please click the Support tab at the top of the page for support options. I suggest you post your question in the Outlook forums.

  • Antti

    Thank You very much for this script!

    I had one “feature” before I could get it to work: I had to modify the leap day -section in Your script, as my Outlook 2011 gave “Invalid date and time 29-02-2011″ -error message; I just changed the “&EndYear” -text to “2012″ as the ongoing year does not have leap day.
    I can change it back to original next year, and then again modify the year -figure to 2016 when we get to year 2013.

    Again, Thank You for Your good and useful work.

  • Parth

    Hi William,

    Thanks for creating such handy script.

    I am getting an error on following code line.

    Script Code: make new calendar event at theCalendar with properties {subject:languageWeek & ” 1″, start time:firstWeekday, end time:firstWeekday + 86400, all day flag:true, has reminder:false, free busy status:free}

    Error Message: Microsoft Outlook got an error: Can’t make class calendar event.

    Would you be able to help?

    • Parth, check these three things:

      1. That you’re Office for Mac applications are updated to at least 14.1.0 or later
      2. That you have created the “Birthdays” calendar (spelling must be exact or you must change it in the script)
      3. Go to Apple menu –> System Preferences… –> Language & Text –> Formats tab. If your region currently says “Custom” then reselect your current region. Restart Outlook and try again.

      I suspect the issue is #2.

      • Parth

        Thanks,

        It was #2. I also modified your script to show week numbers in Day View as well. Here’s the change.

        make new calendar event at theCalendar with properties {subject:languageWeek & " " & weekNumber, start time:nextWeekday, end time:nextWeekday + 604800, all day flag:true, has reminder:false, free busy status:free}

  • mikko

    Hi all,
    I installed the script. What happened – when using month view – only one meeting appears per day. When I add meeting for the day which already shows one meeting outlook gives only triangle on that day – and you are not able to see what meeting is scheduled there?
    What shall I do?
    regards
    m

    • Hi Mikko!

      I am not sure I understand your problem. In Month view you should see as many meetings as will fit each day. If you have more meetings than will fit then UNcheck the Birthdays calendar to hide it temporarily.

      If I am misunderstanding then let me know.

  • Søren

    Hello.

    Thank´s for this perfect help. I was a little to fast and installed the script before i saw the post about adding an own calender for weeks.

    How can i remove the weeknumbers from my calender agian?

    • While in Calendar view use Edit –> Find –> Advanced Find. Search for the events, select them all and delete them. Subject contains “Week -” should work to find them.

  • René Vlak

    Hi,

    Thanks for posting this script, brilliant idea! Unfortunately, it creates week numbers only from the current week onwards (week 40) and it numbers them incorrectly (week 1 rather than 40). Could you please have a look at the script again? Many thanks! By the way, I’m on Outlook for Mac 2011, build 14.1.3 and I have tried both adding to the default Exchange calendar and a manually created local calendar, but the script failed in both instances.

    • The script does work as intended in my environment. More than likely it’s being affected by something with your environment. Have you altered the script in any way? You might try unzipping a fresh copy and using that in case the first one was changed somehow.

      It was developed under a U.S. English region using the date format specified by Mac OS X. What region do you have selected under the Formats tab in the Language & Text pane of System Preferences? If it’s “Custom” then be sure to re-select your correct region.

  • Thanks a lot! I CAN NOT work without week numbers in fact!

  • Erlend Lillelien

    Excellent script!
    Two questions arises:
    How can I mark the week entries with a different color/category?
    How can I lock this calendar to prevent me from accidentially entering appointments in it?

  • Fabio

    Thanks a lot for this script!

  • Micke

    Thanks for your work!!!

  • christian

    Finding this script made me a happier man :)

    Thanks!
    Christian

  • Yago

    Great Job!
    I made the mistake of entering tuesday as the first day of my week and I’d like to correct it… How can you delete the added week numbers?

  • Emeric

    Thanks for this feature very helpful.