Document.UserControl (Word)

True if the document was created or opened by the user.

This property returns False if the document was created or opened programmatically from another Microsoft Office application with the Open method or the Visual Basic CreateObject or GetObject command.


Set wd = New Word.Application 
Set wdDoc = _ 
 wd.Documents.Open("C:\My Documents\doc1.doc") 
If wdDoc.UserControl = True Then 
 MsgBox "This document was created or opened by the user." 
Else 
 MsgBox "This document was created programmatically." 
End If