Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message when you try to use the ActiveChart.Pictures.Paste method in Excel 2007: "Paste method of Pictures class failed"


View products that this article applies to.

Symptoms

When you try to use the ActiveChart.Pictures.Paste method to paste a picture onto a chart in a Microsoft Office Excel 2007 workbook, you receive the following error message:
Run-time error �1004�:

Paste method of Pictures class failed

↑ Back to the top


Cause

This problem occurs because the Pictures object is not available. The ActiveChart object does not provide a Pictures object in Excel 2007.

↑ Back to the top


Workaround

To work around this problem, use the ActiveChart.Paste method.

Note The ActiveChart.Paste method does not return a picture object. Use the Selection object to obtain the handle to the Picture object.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

Steps to reproduce the problem

  1. Start Excel 2007.
  2. Enter some data in the workbook, and then press F11 to create a new chart.
  3. On the Home tab, click Paste, point to As Picture, click Copy as Picture, and then click OK.
  4. Press ALT+F11 to start Visual Basic Editor (VBE).
  5. On the Tools menu, click Macros.
  6. In the Macros dialog box, type Test for in the Macro Name box, and then click Create.
  7. Type ActiveChart.Pictures.Paste, and then, click Run Sub/UserForm on the Run menu.
You receive the error message that is mentioned in the symptoms section.

↑ Back to the top


Keywords: KB931395, kbexpertisebeginner, kbexpertiseinter, kbprb, kbtshoot

↑ Back to the top

Article Info
Article ID : 931395
Revision : 2
Created on : 10/15/2007
Published on : 10/15/2007
Exists online : False
Views : 235