View Single Post
 
Old 11-18-2019, 12:25 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

Quote:
Originally Posted by Guessed View Post
In your Word document ...

Hi


It worked, but I didn't get full information last week, so I had to modify a bit


The document is printed out when a delivery is sent. The date is inserted automatically whenever the document is opened (the field is created using Insert > Date and Time). So instead of Document_ContentControlOnExit() I had to use
Code:
Private Sub Document_Open()
  
    ActiveDocument.SelectContentControlsByTitle("TheWeek")(1).Range.Text = DatePart("ww", Date, 2, 2)

End Sub
Reply With Quote