EditCopyPicture Method

Copies the active view as a picture or an OLE object, or exports the active view to a GIF image file.

Syntax

expression**.EditCopyPicture(Object, ForPrinter, SelectedRows, FromDate, ToDate, FileName, ScaleOption, MaxImageHeight, MaxImageWidth, MeasurementUnits)**

*expression   *     Optional. An expression that returns an Application object.

Object    Optional Boolean. True if the view should be copied as an OLE object. The default value is False.

ForPrinter    Optional Long. Specifies where to copy the view. Can be one of the following PjCopyPictureFor constants: pjScreen, pjPrinter, or pjGIF. If Object is True, ForPrinter is ignored. The default value is pjScreen.

SelectedRows    Optional Boolean. True if Microsoft Office Project 2003 copies only the selected rows. False if the program copies all visible rows.

FromDate    Optional Variant. The beginning of the timescale for the copied picture. If Object is True, FromDate is ignored. If FromDate is specified and ToDate is not, Project will use the last entered date for the end of the timescale. If that would create a negative time span, the program will use the latest timescale date visible in the active view. The default value is the earliest timescale date visible in the active view.

ToDate    Optional Variant. The end of the timescale for the copied picture. If Object is True, ToDate is ignored. If ToDate is specified and FromDate is not, Project will use the last entered date for the beginning of the timescale. If that would create a negative time span, the program will use the earliest timescale date visible in the active view. The default value is the latest timescale date visible in the active view.

FileName    Optional String. The file name for the GIF image file. If ForPrinter is pjGIF, FileName is required. If Object is True, or ForPrinter is not pjGIF, FileName is ignored.

PjCopyPictureScaleOption

Constant Description
pjCopyPictureKeepRange Maintains the selection, regardless of size. If the picture exceeds the amount of available memory, it will be cropped to the maximum available size.
pjCopyPictureScale Scales the picture to MaxImageWidth by MaxImageHeight MeasurementUnits without maintaining the aspect ratio.
pjCopyPictureScaleWRatio Scales the picture to MaxImageWidth by MaxImageHeight MeasurementUnits and maintains the aspect ratio.
pjCopyPictureShowOptions Displays the Copy Picture Options dialog box.
pjCopyPictureTimescale Adjusts the timescale (zooms out) so that the picture fits MaxImageWidth by MaxImageHeight MeasurementUnits.
pjCopyPictureTruncate Truncates any portion of the picture that exceeds the boundaries of MaxImageWidth by MaxImageHeight MeasurementUnits.

MaxImageHeight    Optional Double. Specifies the maximum height of the picture. The accepted range of MaxImageHeight is 1 to 22 inches (2.54 to 55.88 centimeters). The default value is 22 (inches).

MaxImageWidth    Optional Double. Specifies the maximum width of the picture. The accepted range of MaxImageWidth is 1 to 22 inches (2.54 to 55.88 centimeters). The default value is 22 (inches).

PjMeasurementUnits

Constant Description
pjInches The MaxImageWidth and MaxImageHeight values are in inches.
pjCentimeters The MaxImageWidth and MaxImageHeight values are in centimeters.
pjDefault The MaxImageWidth and MaxImageHeight values are in the default system measurement units. The default Measurement System is selected in the Regional and Language Options of the Windows Control Panel.

Remarks

Using the EditCopyPicture method without specifying any arguments displays the Copy Picture dialog box.

Applies to | Application Object

See Also | EditCopy Method | EditPasteSpecial Method | ObjectLinks Method