I'm trying to do something similar to
https://www.msofficeforums.com/word-...nt-header.html (at least it sounds similar) and also running into the same type of problems. I have userform that pops up when the template is opened but the command button leads to runtime error 5941
Code:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("Text1").Range.Text = TextBox1
.InsertBefore TextBox1
.Bookmarks("Text2").Range.Text = TextBox2
.InsertBefore TextBox2
End With
UserForm1.Hide
End Sub
I've been using a macro to open the userform.
Code:
Sub autonew()
'
' autonew Macro
'
'
UserForm1.Show
End Sub
Any help would be appreciated.