View Single Post
 
Old 11-15-2019, 06:45 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default Calculate week in Word document based on date entered into same document

Hi


Into Word document, document date (in format dd.mm.yyyy) is entered. Elsewhere in same document I need an ISO weeknumber of this date displayed. Probably an UDF must be defined to calculate it - something like (on fly)
Code:
Public Function WeekNo(parDate As Date) As Integer
    WeekNo = DatePart(ww, parDate, 2, 2)
End Function
Ideally, in case the date is edited, the weeknumber in document must update too.


Is this possible?
a) in regular Word document;
b) in Word template only.
Reply With Quote