Application.UserControl property (Word)
True if the document or application was created or opened by the user. Read-only Boolean.
Syntax
expression. UserControl
expression A variable that represents an Application object.
Remarks
The UserControl property returns False if the application was created or opened programmatically from another Microsoft Office application with the Open method or the CreateObject or GetObject method.
Note
If Word is visible to the user, or if you call the UserControl property of an Application object from within a code module, this property will always return True.
Example
This example displays the status of the UserControl property for the active document. This example will only work correctly when run from another Office application with the Word object library loaded.
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
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기