Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Installing a Vista Office 2007 developed XLA to XP office 2003 machine | Excel Programming | |||
Office 2007 compatibility pack on Office 2003 (slow network file | Setting up and Configuration of Excel | |||
Opening an Office 2007 Excel file in Office 2003 | Excel Discussion (Misc queries) | |||
Problem with Interop.Excel after uninstalling Office 2007 and installing Office 2003 | Excel Programming |