Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ServerDocument.IsCustomized Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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.

Namespace:  Microsoft.VisualStudio.Tools.Applications
Assembly:  Microsoft.VisualStudio.Tools.Applications.ServerDocument (in Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll)
public static bool IsCustomized(
	string documentPath
)

Parameters

documentPath
Type: System.String

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

Return Value

Type: System.Boolean
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.
ExceptionCondition
ArgumentNullException

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

FileNotFoundException

The file in documentPath does not exist.

DocumentCustomizedWithPreviousRuntimeException

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).

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.