Can I find an answer here about a Word Macro issue? I am trying to apply a macro to a Protected Form document. The user will click on a button to "Add a new Activity" table, which is saved in annother file to be inserted using the macro. But when I apply the macro, this message appears: "Run-time error '4605' The object refers to a Protected document..." I found this code in some forum, but don't know how to configure to make my macro work...
Sub User_name()
' Macro by JanOSX
'
Dim nameStr As String, bName As String
Dim bookNum As Integer
nameStr = Environ("USERNAME")
bookNum = Selection.BookmarkID
ActiveDocument.Sections(2).ProtectedForForms = False
ActiveDocument.FormFields(bookNum).Select
Selection.TypeText (nameStr)
ActiveDocument.Sections(2).ProtectedForForms = True
End Sub
Anyone know how to program Word macros?