MINCUS1308
10-01-2014, 09:49 AM
I have a word document with a number of tables.
In my tables I have a variety of content control fields.
In the event of my document closing, I would like to change the value in one of the controls. (a plain text content control Titled:"'Controlled")
I know it is a simple task but I cant find the correct solution online.
The code below doesn't work.
Private Sub Document_Close()
ActiveDocument.ContentControls("Controlled").Range.Text = Now()
ThisDocument.Save
End Sub
Any help would be greatly appreciated.
In my tables I have a variety of content control fields.
In the event of my document closing, I would like to change the value in one of the controls. (a plain text content control Titled:"'Controlled")
I know it is a simple task but I cant find the correct solution online.
The code below doesn't work.
Private Sub Document_Close()
ActiveDocument.ContentControls("Controlled").Range.Text = Now()
ThisDocument.Save
End Sub
Any help would be greatly appreciated.