Document.UserControl Property

Gets or sets a value that indicates whether the document or application was created or opened by the user.

Namespace:  Microsoft.Office.Tools.Word
Assemblies:   Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Syntax

'Declaration
Property UserControl As Boolean
bool UserControl { get; set; }

Property Value

Type: System.Boolean
true if the document or application was created or opened by the user; false if the document or application was created or opened programmatically from another Microsoft Office application with the Open method or the VBA.Interaction.CreateObject or VBA.Interaction.GetObject method.

Remarks

If Microsoft Office Word is visible to the user, or if you call the UserControl property of a Word Application or Document object from within a Word code customization, this property will always return true.

.NET Framework Security

See Also

Reference

Document Interface

Microsoft.Office.Tools.Word Namespace