Word.Tips.Net Welcome toWord.Tips.Net

Helpful Links

Tips.Net Home
WordTips Home

Ask a Word Question
Make a Comment

Tips.Net Store

WordTips FAQ
WordTips Premium

Learn Access Now
Free Printable Forms

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips

Advertise on the
WordTips Site

Newest Tips

Setting Fraction Bar Overhang Spacing in the Equation Editor

Printing On Both Sides of the Paper

Turning Off AutoComplete for Dates

Ordering Search and Replace

Understanding Auto Line Spacing

Adding Comments to Your Document

Conditional Calculations in Word

 

Determining the Day of the Month

Summary: When writing macros, you may need to know which day of the month a particular date represents. Here's how to use the Day function to determine that information. (This tip works with Microsoft Word 97, Word 2000, Word 2002, Word 2003, and Word 2007.)

When creating macros, you may have a need to know the specific day of the month represented by a particular date. For instance, you may want to determine the day of the month on which the macro is being executed. The following code will do the trick:

iDay = Day(Now())

The Day function returns an integer value representing the day of the month of whatever date you provide. In this example, the Now function represents today's date, and so Day returns today's day of the month.

Tip #807 applies to Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Add a Professional Finishing Touch! Word includes great tools that allow you to add professional-grade finishing touches to your documents. You can add indexes, tables of contents, and other special tables by using the detailed information available in this volume.
 
Check out WordTips: Indexes and Special Tables today!