InsertPicture

Syntax

InsertPicture .Name = text [, .LinkToFile = number] [, .New]

Remarks

Inserts a graphic at the insertion point. If .LinkToFile is set to 1 or 2, the graphic is inserted as an INCLUDEPICTURE field that you can update when the graphics file changes.

Argument

Explanation

.Name

The path and filename of the graphic to insert. If the path is omitted, the current folder is assumed.

.LinkToFile

Specifies whether to insert the graphic as a field and whether to save graphic data in the document:

0 (zero) or omitted Inserts the graphic specified in the .Name argument.

1 Inserts an INCLUDEPICTURE field at the insertion point and saves graphic data in the document.

2 Inserts an INCLUDEPICTURE field at the insertion point and prevents graphic data from being stored in the document by adding a \ d switch.

.New

Inserts a 1-inch–square empty metafile graphic, surrounded by a border.


Example

This example inserts an INCLUDEPICTURE field whose result is the Windows bitmap WINLOGO.BMP:


InsertPicture .Name = "WINLOGO.BMP", .LinkToFile = 1

The following example inserts an INCLUDEPICTURE field whose result is the PICT-format bitmap Artist:


InsertPicture .Name = "Artist", .LinkToFile = 1

See Also

InsertDrawing, InsertFile, InsertObject