Field Property

Microsoft Word Visual Basic

Field Property

       

Returns a Field object that represents the field associated with the specified shape. Read-only.

Note   Use the Fields property to return the Fields collection.

Example

This example inserts a graphic as an inline shape (using an INCLUDEPICTURE field) and then displays the shape's field code.

Dim ishapeNew As InlineShape

Set iShapeNew = _
    ActiveDocument.InlineShapes _
    .AddPicture(FileName:="C:\Windows\Tiles.bmp", _
    LinkToFile:=True, SaveWithDocument:=False, _
    Range:=Selection.Range)

MsgBox iShapeNew.Field.Code.Text