Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers

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
share|improve this answer
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? –  Michael Pliskin Jan 17 '11 at 16:19
add comment

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)
share|improve this answer
1  
sorry, in the next thing I answer i will be more carefully! thanks a lot –  Sergio Feb 22 '12 at 18:46
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.