LinkFormat Property

Microsoft Word Visual Basic

Returns a LinkFormat object that represents the link options of the specified field, inline shape, or shape that's linked to a file. Read/only.

Example

This example inserts a graphic as an inline shape (using an INCLUDEPICTURE field) and then displays the source name (Tiles.bmp).

Set iShape = ActiveDocument.InlineShapes _
    .AddPicture(FileName:="C:\windows\Tiles.bmp", _
    LinkToFile:=True, SaveWithDocument:=False, _
    Range:=Selection.Range)
MsgBox iShape.LinkFormat.SourceName
		

This example updates any fields in the active document that aren't updated automatically.

For Each afield In ActiveDocument.Fields
    If afield.LinkFormat.AutoUpdate = False _
        Then afield.LinkFormat.Update
Next afield