ExportImage Method
Takes a snapshot of the specified Enhanced Chart object and exports the resultant image to a file or the system clipboard. You can specify the file format for the exported image.
Syntax
object.ExportImage bstrDest, enuFormat, enuSizeUnits, dblWidth, dblHeight, [lngDPI], [blnLargeFont]
Properties
The ExportImage method syntax has these parts:
Part |
Description |
|||||||||||||||||||||||||||||||||
object |
An object expression that evaluates to an object in the Applies To list. |
|||||||||||||||||||||||||||||||||
bstrDest |
String. Leave empty for the system clipboard. To export to a file, use the full path. |
|||||||||||||||||||||||||||||||||
enuFormat |
Enum/Long. Specifies the desired image format. It can be either of type enumImageFormat or a corresponding numerical value, as follows:
NOTE: In order to use the enumImageFormat enumerations, you must add the type library file for object to the references of the VBA project. If the type library file is not included in the references, then only numerical values are accepted. The type libraries for objects in the Applied To list are as follows:
|
|||||||||||||||||||||||||||||||||
enuSizeUnits |
Enum/Long. Specifies in what units the image size is specified with dblWidth and dblHeight. It can be either of type enumSizeUnits or a corresponding numerical value, as follows: NOTE: Not all the formats support all the units.
NOTE: In order to use the enumSizeUnits enumerations, you must add the type library file for object to the references of the VBA project. If the type library file is not included in the references, then only numerical values are accepted. The type libraries for objects in the Applied To list are as follows:
|
|||||||||||||||||||||||||||||||||
dblWidth |
Double. Specifies the width of the image, in the units specified in enuSizeUnits. |
|||||||||||||||||||||||||||||||||
dblHeight |
Specifies the heigth of the image, in the units specified in enuSizeUnits. |
|||||||||||||||||||||||||||||||||
lngDPI |
Long. Specifies the dot density of the image, in dots per inch. Defaults to 300 if left unspecified. It must fall between 50 and 600; otherwise it will be ignored. This parameter does not apply to WMF format if enuSizeUnits is set to SizeUnits_NoSpecificSize. |
|||||||||||||||||||||||||||||||||
blnLargeFont |
Boolean. Specifies whether large font should be used in the chart image. Defaults to False if left unspecified. |
Remarks
Regardless of format and dimension, the aspect ratio must be between 0.1 and 10.