LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Office 2003 macro won't run in Office 2007

I created a macro in Office 2003 using early binding to copy data from Excel
into Powerpoint...not the greatest code...but it works! Now my users are
switching to Office 2007 and the code won't run! I have include the relevant
string of code below.

Dim objPPT As Object
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True

Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Dim PPSlide As PowerPoint.Slide

Set PPApp = GetObject(, "Powerpoint.Application")
PPApp.ActivePresentation.Slides.range(Array(13)).S elect

' Reference active presentation
Set PPPres = PPApp.ActivePresentation
PPApp.ActiveWindow.ViewType = ppViewSlide
' Reference active slide
Set PPSlide =
PPPres.Slides(PPApp.ActiveWindow.Selection.SlideRa nge.SlideIndex)

'EXCEL CODE
Sheets("TablesforPP").Select
range("a2").Select
Selection.Copy

'POWERPOINT CODE
PPSlide.Shapes.Paste.Select

This is where it errors with the following message:

"Run-time error '-2147188160(80048240)':
Shapes (unknown member): Invalid request. Clipboard is empty or contains
data which may not be pasted here"

I don't need this coding to be compatible with both Office 2003 and 2007, I
just need it to work in Office 2007. I'm sure I will run into more issues as
I cycle through the code, but if I can understand why this is happening and
fix it, I think I'll be a long way to understanding any subsequent issues.

Thanks,
Nicki


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing a Vista Office 2007 developed XLA to XP office 2003 machine Ed Sowell Excel Programming 4 February 27th 09 08:25 PM
Office 2007 compatibility pack on Office 2003 (slow network file fox_mulder33 Setting up and Configuration of Excel 0 January 2nd 08 03:28 PM
Opening an Office 2007 Excel file in Office 2003 charstachura Excel Discussion (Misc queries) 1 November 8th 07 09:36 PM
Problem with Interop.Excel after uninstalling Office 2007 and installing Office 2003 Bill F[_2_] Excel Programming 2 May 2nd 07 02:52 PM


All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"