在word vba 中Template对象表示模板。Templates对象表示当前打开的所有模板的集合。
以下代码可以获取当前word打开了哪些模板:
Sub QQ1722187970()
Dim oTP As Template
Dim oDoc As Document
Set oDoc = Word.ActiveDocument
For Each oTP In Word.Application.Templates
With oTP
Debug.Print .Name
Debug.Print .Type
Debug.Print .FullName
End With
Next
End Sub


发表评论