View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel[_965_] joel[_965_] is offline
external usenet poster
 
Posts: 1
Default Problem Copying Charts to PowerPoint


Why not move the copypicture to the end of the macro. You may want to
change activesheet to sheets("Sheet1").



'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)
ppPres.Slides.Add 1, ppLayoutBlank

Else
NextSlide = 1 + (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