Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 933789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:53:27+00:00 2026-05-15T20:53:27+00:00

I am using a macro in PowerPoint 2003 SP3 to find a specified chart

  • 0

I am using a macro in PowerPoint 2003 SP3 to find a specified chart in an Excel workbook, copy it, and then paste it into the current slide as an Enhanced Metafile with, ultimately, the following line of code:

Application.ActiveWindow.View.PasteSpecial DataType:=ppPasteEnhancedMetafile

As often as it works, I also receive the following error:

Run-time error '-2147188160 (80048240)':
View (unknown member) : Invalid request. The specified data type is unavailable.

If I end the macro and attempt to manually Paste Special as Enhanced Metafile, I have no problem, so it's not as though the clipboard object or the pastespecialtype is invalid.

Has anyone else experienced this? Do you have a solution or a workaround? There are few results and no solutions in a Google search on this error.


Update

The general code is as follows:

Set presPPTCurrent = ActivePresentation
Set objXLApp = GetObject(, "Excel.Application")

''#Find the target chart and copy it to the clipboard
With objXLApp
    ''#This part works - if I go to Excel, I can see that the chart is copied
End With

''#Now paste in the chart as an Enhanced Metafile
presPPTCurrent.Application.Activate
Application.ActiveWindow.View.PasteSpecial DataType:=ppPasteEnhancedMetafile

Note that this is in a Sub to which a Shape is passed (the Shape being passed is used as a reference to find the chart in Excel). I've realized that it only bugs when I attempt to reuse this sub on multiple shapes passed from a For Next loop in another Sub.

However, if I pass a single Shape to this Sub with via another Sub and then re-run the Sub that passes multiple Shapes, it runs fine.


Solution

Per Otaku's mention, the macro was losing its focus on the Slide Pane. Telling it to re-select the Slide Pane solved the issue.

Application.ActiveWindow.Panes(2).Activate

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:53:27+00:00Added an answer on May 15, 2026 at 8:53 pm

    This is likely a loss of focus where switching between Excel and PowerPoint is causing PowerPoint to lose focus and therefore there is no ActiveWindow for PowerPoint to paste in to or the ActiveWindow becomes a different Pane in PowerPoint, such as the Slide Sorter or the Notes pane.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.