新建模块,想通过魔板,在模板的书签处插入hello字样,但为什么提示 无效不合法的引用。大神帮忙看看
Public Sub CreateWord()
Dim myword As Word.Application
Dim mydoc As New Word.Document
Set myword = New Word.Application
Set mydoc = .Documents.Add(Template:="D:\办案专用\到案经过.dotx", Visible:=True)
mydoc.Sections.GoTo What:=wdGoToBookmark, Which:=wdGoToAbsolute, Name:="到案人1"
mydoc.Sections.TypeText (Text: = "Hello")
End Sub
新建模块,想通过魔板,在模板的书签处插入hello字样,但为什么提示 无效不合法的引用。