LinkedFileStatus Property

Microsoft Publisher Visual Basic

Show All Show All

LinkedFileStatus Property

Returns a PbLinkedFileStatus constant that indicates the status of the file linked to the specified picture. Read-only.

PbLinkedFileStatus can be one of these PbLinkedFileStatus constants.
pbLinkedFileMissing The file can no longer be found at the specified path.
pbLinkedFileModified The linked file has been modified since it was linked to the picture.
pbLinkedFileOK The file resides at the specified path, and has not been modified since it was linked to the picture.

expression.LinkedFileStatus()

expression    Required. An expression that returns a PictureFormat object.

Remarks

This property only applies to linked picture files. Returns "Permission Denied" for shapes representing embedded or pasted pictures.

Use either of the following properties to determine whether a shape represents a linked picture:

Example

The following example generates a list of the linked pictures in the active publication for which the linked files cannot be found.

    Dim pgLoop As Page
Dim shpLoop As Shape

For Each pgLoop In ActiveDocument.Pages
    For Each shpLoop In pgLoop.Shapes
        If shpLoop.Type = pbLinkedPicture Then
        
            With shpLoop.PictureFormat
                If .LinkedFileStatus = pbLinkedFileMissing Then
                Debug.Print .Filename
                End If
            End With
            
        End If
    Next shpLoop
Next pgLoop