OpenLinks Method

Applies To

Workbook object.

Description

Opens the supporting documents for a link or links.

Syntax

expression.OpenLinks(Name, ReadOnly, Type)

expression Required. An expression that returns a Workbook object.

Name Required String. The name of the Microsoft Excel or DDE/OLE link, as returned from the LinkSources method.

ReadOnly Optional Variant. True to open documents as read-only. The default value is False.

Type Optional. The link type. Can be one of the following XlLink constants: xlExcelLinks, xlOLELinks (also handles DDE links), xlPublishers, or xlSubscribers.

Example

This example opens OLE link one in the active workbook.

linkArray = ActiveWorkbook.LinkSources(xlOLELinks)
ActiveWorkbook.OpenLinks linkArray(1)
This example opens all supporting Microsoft Excel documents for the active workbook.

ActiveWorkbook.OpenLinks _
    name:=ActiveWorkbook.LinkSources(xlExcelLinks)