Hi,
I have a PowerPoint Presentation that is linked to live graphs in excel. Each time I change the pivots in excel the graphs change on the powerpoint. There are 4 graphs on 1 slide. I need to copy the entire slide and paste it into a new powerpoint slide, but without any of the links to excel( i.e pictures only). This is then repeated numerous times depending on how many variations of the graphs are required based on a selection in excel.
I currently have a macro that copies the slide each time the pivot is updated into a new document.
Please an example of the code below:
For t = 1 To Counter '(Counter is the number of selections made in excel)
NewCat = Worksheets("Graphs").Range("a151").Offset(t - 1, 0).Value
'This updates the PIVOT table
With pt '(First pivot that is updated)
Field.ClearAllFilters
Field.CurrentPage = NewCat '(changes the Field 'Category' in a loop based on a list of selections made)
End With
With pt1 '(second pivot)
Field1.ClearAllFilters
Field1.CurrentPage = NewCat
End With
With pt2 '(third pivot)
Field2.ClearAllFilters
Field2.CurrentPage = NewCat
End With
With pt3
Field3.ClearAllFilters
Field3.CurrentPage = NewCat
End With
'paste into PowerPoint
pptpres.UpdateLinks (Updates the initial powerpoint presentation with the new selection)
Dim x As Integer
x = 1
For Each pptslide In pptpres.Slides
pptpres.Slides(x).Copy
pptpres2.Slides.Paste
x = x + 1
Next
Next t
The only problem is that this takes some time to run, and I do not require the links to be saved in the new powerpoint. I dont want them to update once the report is compiled.
Any help would be great,
Thanks
Alistair
Bookmarks