Paste Special Issues

N

Nirmalya

I have a PowerPoint Presentation with linked objects (Excel charts). I
am trying to write a macro that uses Paste Special to make a copy of a
slide and paste it as a metafile in another slide in the same
presentation. Anyone with any ideas on how to go about it?
Also for some strange reason, I am not getting the Run option for my
macros.
Any help in this matter will be appreciated.

Nirmalya.
 
N

Nirmalya

Steve,
I am using Office 2003. Here is the code:

Private Sub CommandButton1_Click()
ActivePresentation.Slides(1).Shapes.SelectAll
ActiveWindow.Selection.Copy
ActivePresentation.Slides(2).PasteSpecial DataType:=ppPasteGIF, _
DisplayAsIcon:=msoTrue, IconLabel:="Last Month"
End Sub

When I try to run the macro, it gives me a compilation error:
Method or data member not found.
The debugger highlights the .PastSpecial part of
ActivePresentation.Slides(2).PasteSpecial

As for running the macro, I forgot to put it in the Slide Show mode. So
ignore my second query. Thanks for all your help.

Nirmalya.
 
N

Nirmalya

Hey everyone,
I am trying to paste special some linked objects from slide 1 to slide
2 as gif files. I am on Office 2003.
The final updated version of my code as it stands:

Private Sub CommandButton1_Click()
ActivePresentation.Slides(1).Shapes.SelectAll
ActiveSelection.Copy
ActivePresentation.Slides(2).Select
ActiveWindow.View.PasteSpecial DataType:=ppPasteGIF, _
DisplayAsIcon:=msoTrue, IconLabel:="Last Month"
End Sub

I am getting a run-time error. Error msg -
Shape (Unknown member): Invalid request. The window must be in slide or
notes view.

I am at a blank here. Any help will be appreciated.

Regards,
Nirmalya.
 
N

Nirmalya

Steve,
I really appreciate your help. This block was the game-winner for me.
With ActivePresentation
.Slides(1).Shapes.Range.Copy
.Slides(2).Shapes.PasteSpecial _
DataType:=ppPasteGIF, _
DisplayAsIcon:=msoTrue, _
IconLabel:="Last Month"
End With

I think my code didn't work because I wouldn't call the Shapes object
in the PasteSpecial method. Now, I have a working template for future
reference. Thanks once again.

Regards,
Nirmalya.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top