Here is my current code.
Sub PrintMasterTime()
Dim PropVal As Integer
PropVal = ActiveDocument.CustomDocumentProperties(MasterTime).Value
Print PropVal
End Sub
Compile Error: Method not valid without suitable object
Not sure why it's not printing. "MasterTime"
is the name of my custom document property.
You need to call CustomDocumentProperties
with a string. You forgot the quotes.
PropVal = ActiveDocument.CustomDocumentProperties("MasterTime").Value