Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I think I found the problem. Your slide count is wrong. When you create a new presentation it automatically creates a presentation with one slide. So when you add a slide you have two slides. The number of slides is always one created than your slide count When you already have a presentation your slide count equals the number of slides. I remove the add slide from the case where you don't have a presentation. then I removed the add 1 from the Next slide count. 'Open PowerPoint Set myAPP = CreateObject("Powerpoint.Application") myAPP.Visible = True myAPP.WindowState = ppWindowMinimized ThisWorkbook.Activate 'Create one new PowerPoint presentation and no more If myAPP.Presentations.Count = 0 Then Set ppPres = myAPP.Presentations.Add(msoTrue) Else NextSlide = myAPP.ActivePresentation.Slides.Count myAPP.ActiveWindow.View.GotoSlide Index:=myAPP.ActivePresentation.Slides.Add(NextSli de, Layout:=ppLayoutBlank).SlideIndex End If 'Paste the left side of the image into a PowerPoint slide thisworkbook.activesheet.Range("Analysis_Left").Co pyPicture Appearance:=xlScreen, Format:=xlPicture myAPP.ActiveWindow.View.Paste -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=199831 http://www.thecodecage.com/forumz |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel hangs when copying sheet with charts to Powerpoint | Excel Discussion (Misc queries) | |||
Excel 2007 - copying charts to Word problem | Charts and Charting in Excel | |||
Copy/Paste Charts; Define Destination of Charts in PowerPoint | Excel Programming | |||
Problems copying charts into PowerPoint | Charts and Charting in Excel | |||
vba for PowerPoint Charts | Excel Programming |