DocumentNotCustomizedException Class (2007 System)

The exception that is thrown when you try to perform an invalid operation on a document by using the ServerDocument class.

Namespace:  Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly:  Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0 (in Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll)

Syntax

'Declaration
<SerializableAttribute> _
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
Public NotInheritable Class DocumentNotCustomizedException _
    Inherits RuntimeException
'Usage
Dim instance As DocumentNotCustomizedException
[SerializableAttribute]
[PermissionSetAttribute(SecurityAction.Demand, Name = "FullTrust")]
public sealed class DocumentNotCustomizedException : RuntimeException
[SerializableAttribute]
[PermissionSetAttribute(SecurityAction::Demand, Name = L"FullTrust")]
public ref class DocumentNotCustomizedException sealed : public RuntimeException
public final class DocumentNotCustomizedException extends RuntimeException

Remarks

This exception is thrown in the following cases:

  • If you use the ServerDocument.ServerDocument constructor to open a document that does not already have a Visual Studio Tools for Office customization, and you try to open the document in read-only mode.

  • If you try to attach a customization to a document by using the AddCustomization method, but the document is corrupt or has restricted permissions.

Inheritance Hierarchy

System.Object
  System.Exception
    Microsoft.VisualStudio.Tools.Applications.Runtime.RuntimeException
      Microsoft.VisualStudio.Tools.Applications.Runtime.DocumentNotCustomizedException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

DocumentNotCustomizedException Members

Microsoft.VisualStudio.Tools.Applications.Runtime Namespace