3

Is there any way in MS Word to insert current week number? I need to make a template for the weekly report, and I'd like the week number field to be filled in automatically... What I need is something similar to Excel WEEKNUM() function.

3 Answers 3

2

This can be done with a VB Macro. This macro will insert the current week after the current selection.

Sub adddate()
    Selection.InsertAfter Text:=DatePart("ww", Date)
End Sub
1
  • 1
    Of course this will work, but what I need is something more static - i.e. when I make a new document out of template, the week is already set correctly. Is this possible? Jan 17, 2011 at 16:19
0

If you want it in Word you need a Macro, but if you use Excel this might work.

Calculating the difference between each pair of dates listed in columns

A & B.

Solution:

To calculate the difference in days, use the DATEDIF function as shown in the following formula:

=DATEDIF(A2,B2,"d")

To calculate the difference in weeks, use the INT function as shown in the following formula:

=INT((B2-A2)/7)
0
0

There is a work around all that codes. Just use an excel file with WEEKNUM() and then link the cell to the word file. (it's nice if you can make use of that file in otherways as well, so it makes you open it before you need to update the word file) Of course, depends on the specific application one is after if that can make life easier or not.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .