Dim AppWD As Object
Dim objDoc As Object
Dim objDocProdTP As Object
...
Set AppWD = CreateObject("Word.Application") 'Word als Object starten
AppWD.Visible = True
Set objDocProdTP = AppWD.documents.Open(workPath & "\vorlagen\LFPostTemplate.docx")
Set objDoc = AppWD.documents.Open(workPath & "\vorlagen\LFTemplate2.docx")
...
MsgBox (objDoc.Bookmarks.Count)
objDoc.Goto what:=wdGoToBookmark, Name:="lblSFirma"
MSGBox 返回 11 个书签(与 LFPostTemplate.docx 中的书签总数匹配)
但是我尝试的每个书签名称都会返回“此书签不存在”
我怀疑这个问题很简单......但谷歌似乎没有为我提供任何解决方案