Search code examples
javascriptms-wordoffice-jsoffice-addins

Word JS API: insert date into content control


How can I insert a date in the word content control using Office JS API?


Solution

  • Assign the date (formatted as you like) to a string var and then pass the var as the first parameter to the ContentControl.insertText method.