WD2000: How to Change the Default Starting Day of the Week in the Calendar Wizard (275327)



The information in this article applies to:

  • Microsoft Word 2000

This article was previously published under Q275327

SUMMARY

When you create a calendar by using the Calendar Wizard in Microsoft Word, the starting day of each week is Sunday. However, you may want to create a calendar in which each week starts with a different day (for example, Monday).

This article explains how to change the default starting day in the Calendar Wizard by modifying the existing code of the Calendar Wizard.

NOTE: Microsoft does not support the modification of its wizards or templates. Modifications done by the user are at the user's risk and constitute no obligations or warranties, either written or expressed, by Microsoft.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base:

212536 OFF2000: How to Run Sample Code from Knowledge Base Articles

To change the starting day for each week of a calendar, follow these steps:
  1. On the File menu, click Open and open the Calendar Wizard (Calendar Wizard.wiz).

    By default, the Calendar Wizard.wiz template is located in the following folder:

    C:\Program Files\Microsoft Office\Templates\1033

  2. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  3. In the Project window, double-click the Calendar module. You may need to expand the Modules folder listed in the TemplateProject (Calendar Wizard) project.

    NOTE: If the Project window does not appear, click Project Explorer on the View menu.
  4. On the Edit menu, click Find.
  5. In the Find What box, type iWeekStartDay and then click Find Next.
  6. After iWeekStartDay is found, click Cancel.

    The following macro code lines are found near the top of the macro:
    ' Localization Note: iWeekStartDay is the starting day of the week (Sun = 0, Mon = 1, ...Sat = 6)
    Public Const iWeekStartDay       As Integer = 0
  7. To change the default starting day for your calendar, change the Integer value to one of the following:
     Starting day of week  Value 
     Sunday  0 
     Monday  1 
     Tuesday  2 
     Wednesday  4 
     Thursday  5 
     Friday  6 
     Saturday  7 
    For example, if you want your calendar week to begin on Monday, change the Integer value to 1, as in the following example:
    Public Const iWeekStartDay       As Integer = 1
  8. On the File menu, click Save Calendar Wizard.
  9. On the File menu, click Close and Return to Microsoft Word to close the Visual Basic Editor.
  10. On the File menu, click Close to close the Calendar Wizard.
Now, when you run the Calendar Wizard, your calendar week begins with the day that you specified in the macro.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbdtacode kbhowto kbmacroexample kbwordvba wd2000 KB275327