![]() |
Adding Excel charts to PowerPoint presentation in Office 2003
In Office 2000 this code worked perfectly:
Dim xlCurrChart As Excel.Chart Dim xlBook As Excel.Workbook Dim pptShape As PowerPoint.Shape Set pptShape = rpptTarget.Shapes.AddOLEObject(Width:=fDefaultWidt h, Height:=fDefaultHeight, ClassName:="Excel.Sheet") Set xlBook = pptShape.OLEFormat.Object Set xlCurrChart = xlBook.Charts.Add() But now testing this with Office 2003, the last line raises an error. The weird thing is that this code is in a loop and the error is only raised the first time that this code fires. After the first loop, the code no longer raises any errors and works fine. The error message is: Error number: - 2147417851 method '~' of object '~' failed. Any ideas? |
All times are GMT +1. The time now is 02:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com