IKnowledgeDocument Interface

The IKnowledgeDocument interface defines the methods and properties of, and is implemented by, the KnowledgeDocument object.

The KnowledgeDocument object represents a document that is contained in the SharePoint Portal Server store.

The KnowledgeDocument object has the following capabilities:

  • Basic document management, such as creating, moving, copying, and deleting documents.
  • Storage of metadata, such as properties and categories, with each document.
Extends

IKnowledgeMessage interface

Properties

The following table shows the properties of the IKnowledgeDocument interface the type of each property, and brief descriptions for each. All properties are read/write, except where noted.

Name Type Description
Author

[Visual Basic]String

[C++]BSTR

Author of the document. Defaults to an empty string.
BestBetCategories

[Visual Basic]Variant

[C++]VARIANT

List of category names that determine that this document is included in the Best Bet list in a search.
BestBetKeywords

[Visual Basic]Variant

[C++]VARIANT

List of items that determine that this document is included in the Best Bet list in a search.
Categories

[Visual Basic]Variant

[C++]VARIANT

List of categories for this document.
ContentClass

[Visual Basic]String

[C++]BSTR

Uniform Resource Identifier (URI) of the content class that defines the properties for this object. This property is inherited from the KnowledgeItem object.
ContentClassObject

[Visual Basic]KnowledgeContentClass

[C++]IKnowledgeContentClass

KnowledgeContentClass object that defines the properties for this object. This is a read-only property inherited from the KnowledgeItem object.
CreationDate

[Visual Basic]Date

[C++]Date

Date and time in Greenwich mean time (GMT) that the item was created in the local database or file system. This is a read-only property inherited from the KnowledgeItem object.
DataSource

[Visual Basic]IDataSource

[C++]IDataSource

IDataSource interface for this object. This is a read-only property inherited from the KnowledgeItem object.
Description

[Visual Basic]String

[C++]BSTR

Description of this object. This property is inherited from the KnowledgeItem object.
DisplayName

[Visual Basic]String

[C++]BSTR

Name that is displayed for this object. This is a read-only property inherited from the KnowledgeItem object.
Fields

[Visual Basic]String

[C++]BSTR

ActiveX Data Objects (ADO) fields collection associated with this object. This is a read-only property inherited from the KnowledgeItem object.
GetContentLength

[Visual Basic]Long

[C++]long

Length of the document. This is a read-only property inherited from the KnowledgeMessage object.
GetContentType

[Visual Basic]String

[C++]BSTR

Type of the document. This is a read-only property inherited from the KnowledgeMessage object.
GetLastModified

[Visual Basic]Date

[C++]Date

Date and time in Greenwich mean time (GMT) that the item was last modified in the local user's database or file system. This is a read-only property inherited from the KnowledgeItem object.
Href

[Visual Basic]String

[C++]BSTR

Absolute URL of the item. This is a read-only property inherited from the KnowledgeItem object.
Interfaces

[Visual Basic]Variant

[C++]VARIANT

List of interfaces that this object supports. This is a read-only property inherited from the KnowledgeItem object.
IsReadOnly

[Visual Basic]Boolean

[C++]VARIANT_BOOL

Flag that indicates whether the item is read-only. This property is inherited from the KnowledgeItem object.
Keywords

[Visual Basic]Variant

[C++]VARIANT

List of keywords or phrases for this document. Defaults to an empty array.
NoAccess

[Visual Basic]Variant

[C++]VARIANT

List of users who are not allowed to access the document. Defaults to an empty array.
PromptToAuthenticate

[Visual Basic]Boolean

[C++]VARIANT_BOOL

Flag that indicates whether to show an authentication dialog box when access fails. This property is inherited from the KnowledgeItem object.
Property

[Visual Basic]Variant

[C++]VARIANT

Value of a specified property. This property is inherited from the KnowledgeItem object.
Title

[Visual Basic]String

[C++]BSTR

Short string that identifies the object. This property is inherited from the KnowledgeItem object.
Workflow   Not supported.
Methods

The following table shows the methods of the IKnowledgeDocument interface, with brief descriptions for each.

Name Description
Copy Copies the object to a new location. This method is inherited from the KnowledgeItem object.
Delete Deletes the object or its specified child objects. This method is inherited from the KnowledgeItem object.
GetInterface Gets a specified interface implemented by this object. This method is inherited from the KnowledgeItem object.
Move Moves the object to a new location. This overwrites any previously existing object of the same name without prompting for confirmation. This method is inherited from the KnowledgeItem object.
OpenStream Opens the data stream. This method is inherited from the KnowledgeMessage object.
Rebind Rebinds this object to a URL.
Remarks

The properties and methods of the KnowledgeDocument object work with a SharePoint Portal Server document as a whole as well as the metadata associated with the document. The KnowledgeDocument object supports accessing the contents of a document, but applications, such as those included in Microsoft® Office 2000, work on the document content.

Some properties of the KnowledgeDocument object are other SharePoint Portal Server objects. For example, the KnowledgeDocument.Workspace property is a SharePoint Portal Server KnowledgeWorkspace object.

Example

To see this object in a fuller context, see Document Management Object Model Sample.

Requirements
  • Type Library
    Microsoft PKMCDO for Microsoft Web Storage System
  • Inproc Server
    %Program Files%\Common Files\PKMCDO.dll

Addressing by Using URLs

Binding to Items Stored in SharePoint Portal Server

SharePoint Portal Server Code Practices

Using the Document Management Object Model