这是我当前的代码。
Sub PrintMasterTime()
Dim PropVal As Integer
PropVal = ActiveDocument.CustomDocumentProperties(MasterTime).Value
Print PropVal
End Sub
编译错误: Method not valid without suitable object
不知道为什么它不打印。"MasterTime"
是我的自定义文档属性的名称。
您需要CustomDocumentProperties
使用字符串进行调用。您忘记了报价。
PropVal = ActiveDocument.CustomDocumentProperties("MasterTime").Value
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句