LinkInfo Method

Applies To

Workbook Object.

Description

Returns information on link date and update state.

Syntax

object.LinkInfo(name, linkInfo, type, editionRef)

object

Required. The Workbook object.

name

Required. Specifies the name of the link, as returned from the LinkSources method.

linkInfo

Required. Specifies the type of information to be returned about the link (either xlUpdateState or xlEditionDate). xlEditionDate applies only to editions. For xlUpdateState, this method returns 1 if the link updates automatically, or 2 if the link must be updated manually.

type

Optional. Specifies the type of link to return. Can be one of xlOLELinks (also handles DDE links), xlPublishers, or xlSubscribers.

editionRef

Optional. If the link is an edition, this argument specifies the edition reference as a string in R1C1-style form. This argument is required if there are more than one publisher or subscriber with the same name in the workbook.

Example

This example displays a message box if the link updates automatically.


If ActiveWorkbook.LinkInfo( _
        "Word.Document.6|Document1!'!DDE_LINK1", xlUpdateState, _
        xlOLELinks) = 1 Then
    MsgBox "Link updates automatically"
End If