Dim myword As Word. Application
Dim mydoc As New Word. The Document
The Set myword=New Word. Application
The Set mydoc=. The Documents. The Add (Template:="D: \ special case to present himself. \ dotx", Visible:=True)
Mydoc. Sections. GoTo I:=wdGoToBookmark, Which:=wdGoToAbsolute, Name:="accomplices who 1
"Mydoc. Sections. TypeText (Text:="Hello")
End Sub
New module, want to pass the rubik's magic, at the bookmark template insert wording, hello, but why prompt invalid illegal references,
CodePudding user response:
mydoc. Sections. TypeText (Text:="Hello")
Remove the parentheses to
mydoc. Sections. TypeText Text:="Hello"
Have a try