IsLinked Property

Microsoft Publisher Visual Basic

MsoTriState can be one of these MsoTriState constants.
msoCTrue Not used with this property.
msoFalse The picture is not a linked picture.
msoTriStateMixed Indicates a combination of msoTrue and msoFalse for the specified shape range.
msoTriStateToggle Not used with this property.
msoTrue The specified picture is a linked picture.

expression.IsLinked()

expression    Required. An expression that returns a PictureFormat object.

Remarks

Returns msoFalse for pasted or embedded pictures and OLE objects.

If a picture or OLE object is linked, several additional properties of the PictureFormat object dealing with the original picture (such as OriginalFileSize) are accessible.

Example

The following example returns whether the first shape on the first page of the active publication contains an alpha channel. If the picture is linked, and the original picture contains an alpha channel, that is also returned. This example assumes the shape is a picture.

With ActiveDocument.Pages(1).Shapes(1).PictureFormat
    If .HasAlphaChannel = msoTrue Then
        Debug.Print .Filename
        Debug.Print "This picture contains an alpha channel."
        
        If .IsLinked = msoTrue Then
            If .OriginalHasAlphaChannel = msoTrue Then
                Debug.Print "The linked picture " & _
                "also contains an alpha channel."
            End If
        End If
    End If
End With