SetDocumentPropertyLink

Syntax

SetDocumentPropertyLink Name$, Source$

Remarks

Defines a custom property for the active document and links it to an existing bookmark named Source$. If Source$ doesn't exist, an error occurs. Use the DocumentPropertyExists() function to verify that the Name$ property exists.

For a list of the built-in properties available in Word, see DocumentPropertyName$(). In Word version 6.0, SetDocumentPropertyLink is unavailable and generates an error.

Argument

Explanation

Name$

The name of the property. Name$ can be a built-in property or a custom property.

Source$

The name of the bookmark.


Example

This example inserts a DATE field at the insertion point, defines the DateOfLetter bookmark, and defines a custom property for the active document. This property is linked to the DateOfLetter bookmark.


InsertField .Field = "DATE"
EditGoto .Destination = "d- 'DATE'"
UnlinkFields
EditBookmark .Name = "DateOfLetter", .Add
SetDocumentPropertyLink("Date of letter","DateOfLetter")

See Also

GetDocumentProperty(), SetDocumentProperty