Thread: [Solved] Help creating a word macro
View Single Post
 
Old 07-13-2022, 07:07 AM
Makingwork Makingwork is offline Windows 10 Office 2021
Novice
 
Join Date: Jul 2022
Posts: 4
Makingwork is on a distinguished road
Default

I have one more question. Let's say I have 2 more boxes that I need the Date to copy to.

Is it possible to have the Date copied to multiple boxes?
If I name them all "BoxesDate" only 1 updates.

Sub UpdateBoxes(j As Long, StrDt As String)
With ActiveDocument.SelectContentControlsByTitle("Boxes Date")(1)
.LockContents = False
If j = 0 Or StrDt = "" Then
.Range.Text = ""
Else
.Range.Text = ActiveDocument.SelectContentControlsByTitle("Date" )(1).Range.Text)
End If
.LockContents = True
End With
End Sub
Reply With Quote