logo
search
VBA & Macro Problems

How to Copy an Excel Range as an Image to Clipboard via VBA

Elise WilliamsElise Williams Oct 7, 2026 874 views

Question details

The user wants to use a VBA macro to copy a specific range of cells in Excel as a picture directly to the system clipboard, bypassing the need to save an image file to the desktop.

How to Copy an Excel Range as a Screenshot to the Clipboard with VBA
Product
Excel
Device & OS
not provided
Scenario
Capturing a dynamic or fixed cell range as a screenshot to manually paste into external communication tools like Microsoft Teams, Word, or Outlook.
Observed behavior
Instead of executing scripts that save permanent PNG or JPEG files locally, the goal is to have the image immediately available on the clipboard for instant pasting.
Before you start

Ensure your Excel workbook is saved as a Macro-Enabled Workbook (.xlsm) and that you have enabled the Developer tab to access the VBA editor.

Solution 1Recommended

Use the VBA CopyPicture Method

The most direct way to copy an Excel range as an image to the clipboard is by utilizing the built-in CopyPicture method. This avoids saving any files locally.

The CopyPicture method natively mimics the 'Copy as Picture' feature found in the Excel ribbon. It directly transfers the visual representation of the cells to your computer's clipboard.

1
Open the VBA Editor

Press ALT + F11 on your keyboard to launch the Microsoft Visual Basic for Applications editor.

2
Insert a New Module

In the top menu, click 'Insert' and select 'Module' to create a blank script window.

3
Write the Macro Code

Paste the following code into the module: Sub CopyRangeAsPicture() Range("A1:C10").CopyPicture Appearance:=xlScreen, Format:=xlPicture End Sub

4
Run the Macro

Press F5 or click the Run button. The specified range (A1:C10) is now copied to your clipboard as an image, ready to be pasted into Word, Teams, or Outlook.

Use the VBA CopyPicture Method
Copying the Active Selection: If you want the macro to copy whichever cells you currently have highlighted, replace 'Range("A1:C10")' with 'Selection' in the VBA code.

Copy Cell Ranges as Images Instantly with WPS Office

If you want to skip writing VBA macros altogether, WPS Spreadsheet features a built-in 'Camera' tool that lets you seamlessly capture any cell range as an image and copy it to your clipboard with one click.

  1. 1. Open Your Spreadsheet in WPS Office: Launch WPS Spreadsheet and open your workbook. Highlight the cell range you wish to copy as a picture.
  2. 2. Access the Camera Tool: Navigate to the 'Insert' tab on the top ribbon and locate the 'Camera' tool icon.
  3. 3. Capture the Range: Click the Camera tool. The selected range is instantly captured as an image object.
  4. 4. Copy and Paste: Copy the captured image object (Ctrl + C). You can now switch to any external application like Microsoft Teams or Word and press Ctrl + V to paste the screenshot directly.
Built-in Camera tool for instant snapshots without writing any VBA code.Highly compatible with Microsoft Excel (.xlsx and .xlsm) formatting.Free and lightweight alternative to heavy traditional office suites.Seamless clipboard integration for pasting into Word, Outlook, or Teams.
microsoft office alternative - wps office

Frequently Asked Questions

Why does CopyPicture sometimes result in a blank image when pasted?

This usually occurs due to timing issues where Excel hasn't fully rendered the screen before copying. Adding 'DoEvents' right before or after your CopyPicture command in the VBA script can force Excel to catch up and resolve the blank image issue.

Can I copy the image as a bitmap instead of a vector picture?

Yes, you can modify the format argument in your VBA macro. Use 'Range.CopyPicture Appearance:=xlScreen, Format:=xlBitmap' to force the screenshot to be copied as a standard bitmap.

Does this macro capture charts and shapes inside the cell range?

Yes, by using the 'Appearance:=xlScreen' parameter, the CopyPicture method creates an exact visual copy of what is displayed on your monitor. This includes cell formatting, gridlines, charts, and overlaying shapes within that boundary.

Is it possible to assign this macro to a button for easy clicking?

Absolutely. Once you have saved your CopyRangeAsPicture macro, you can go to the Developer tab, click 'Insert', choose a Button from the Form Controls, draw it on your sheet, and assign the macro to it. Clicking the button will instantly copy the range to your clipboard.