Compartir a través de


ServerDocument.IsCustomized(String) Method

Definition

Gets a value that indicates whether the specified document has a customization that was created by using the Visual Studio 2010 Tools for Office Runtime.

public:
 static bool IsCustomized(System::String ^ documentPath);
public static bool IsCustomized (string documentPath);
static member IsCustomized : string -> bool
Public Shared Function IsCustomized (documentPath As String) As Boolean

Parameters

documentPath
String

The full path of the document that you want to check for a customization.

Returns

true if the document has a customization that was created by using the Visual Studio 2010 Tools for Office Runtime; false if the document does not have a customization.

Exceptions

The documentPath parameter is null or empty or consists entirely of white space characters.

The file in documentPath does not exist.

The file specified by documentPath has a customization that was not created with the Visual Studio 2010 Tools for Office Runtime or the Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime).

Remarks

This method throws an exception if the specified document has a customization that was not created with the Visual Studio 2010 Tools for Office Runtime or the Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime). For example, this method throws an exception if you specify a document that was created by using a project template for Microsoft Office 2003 in Visual Studio 2008, because these project templates use the Visual Studio 2005 Tools for Office Second Edition runtime.

To determine whether a document has a customization that was created by using any version of Visual Studio, use the GetCustomizationVersion method instead of the IsCustomized method. GetCustomizationVersion returns 0 (zero) if the document does not have a customization.

Applies to