LinkInfo Method
Applies To
Workbook object.
Description
Returns the link date and update status.
Syntax
expression.LinkInfo(Name, LinkInfo, Type, EditionRef)
expression Required. An expression that returns a Workbook object.
Name Required String. The name of the link, as returned from the LinkSources method.
LinkInfo Required Long. The type of information to be returned. Can be one of the following XlLinkInfo constants: xlUpdateState or xlEditionDate. xlEditionDate applies only to editions. For xlUpdateState, this method returns 1 if the link updates automatically, or it returns 2 if the link must be updated manually.
Type Optional Variant. The type of link to return. Can be one of the following XlLinkInfoType constants: xlLinkInfoOLELinks (also handles DDE links), xlLinkInfoPublishers, or xlLinkInfoSubscribers.
EditionRef Optional Variant. If the link is an edition, this argument specifies the edition reference as a string in R1C1 style. This argument is required if there's more than one publisher or subscriber with the same name in the workbook.
Example
This example displays a message box if the link is updated automatically.
If ActiveWorkbook.LinkInfo("Word.Document|Document1!'!DDE_LINK1", _
xlUpdateState, xlOLELinks) = 1 Then
MsgBox "Link updates automatically"
End If