How to Control Excel VBA Chart Export Image Resolution
Question details
The user needs to export a chart via Excel VBA at a high enough DPI so that the image retains its correct physical dimensions when inserted into a Word document.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Automating chart exports using the ActiveChart.Export method in an Excel VBA macro.
- Observed behavior
- Charts exported via the VBA ActiveChart.Export method have a lower DPI than those saved manually as a picture, causing the image to appear in the wrong size when inserted into Word.
Ensure that your workbook is saved in a macro-enabled format (.xlsm) and that you have enabled the Developer tab to access the Visual Basic editor.
Use the ActiveWindow Zoom Workaround in VBA
Since VBA does not have a native DPI parameter for chart exports, you can force a higher resolution output by temporarily increasing the window zoom percentage before exporting.
The ActiveChart.Export method captures the chart based on the current screen rendering. By increasing the ActiveWindow zoom level to a high value like 300%, you force Excel to render the chart at a much larger pixel size, thereby increasing the effective resolution of the exported image.
Press Alt + F11 in Excel to open the Visual Basic for Applications (VBA) window, and navigate to the module containing your chart export macro.
Declare a variable to remember the user's current zoom setting by adding: Dim lngZoom As Long lngZoom = ActiveWindow.Zoom
Set the zoom to a high value before the export command: ActiveWindow.Zoom = 300
Run your export command (e.g., ActiveChart.Export "C:\MyPicture.jpg", "JPG"), and immediately restore the original view by adding: ActiveWindow.Zoom = lngZoom

Manually Save the Chart as a Picture
If the VBA macro continues to export at a low DPI, manually saving the chart ensures higher fidelity and better compatibility when pasting into Word.
Export High-Resolution Charts Natively in WPS Office
Avoid complex VBA workarounds. WPS Spreadsheet provides intuitive built-in tools to directly export charts and cell ranges as high-quality images, giving you complete control over output quality for your documents and presentations.
- 1. Open your spreadsheet: Launch WPS Office and open your workbook containing the chart.
- 2. Select the chart: Click on the chart you wish to export to make it active.
- 3. Export as Picture: Right-click the chart and choose the 'Save as Picture' option, then select your preferred image format and destination to save the high-resolution file.

Frequently Asked Questions
Why does ActiveChart.Export output lower DPI images?
The ActiveChart.Export method in Excel VBA defaults to screen resolution (typically 96 DPI). It prioritizes rendering the on-screen display over print-quality DPI metadata, which causes images to appear differently when inserted into physical-dimension-based applications like Word.
Can I specify an exact DPI parameter in Excel VBA?
No, Excel VBA does not provide a direct parameter in the ActiveChart.Export method to specify the exact DPI (such as 300 DPI). You must use visual scaling workarounds (like changing the Window Zoom) or rely on third-party image manipulation libraries.
How do I stop Word from resizing my inserted charts?
Word uses the image's embedded DPI metadata to calculate its physical size on the page. If the image was exported at 96 DPI instead of 220 or 300 DPI, Word scales it up. You can fix this by using a basic image editor to change the DPI metadata to match your target print resolution without resampling the image, then insert it into Word.




