moving pasted objects

I

ikeriba

I have copied some parts of an excel table and paste them
in powerpoint as an image. This is the code (the macro is
run in Excel):
******************
Range("C10").Select
Selection.CopyPicture Appearance:=xlScreen, _
Format:=xlPicture
PPSlide.Shapes.Paste
(where PPSlide is the selected slide in the Powerpoint
presentation)
*****************
And I paste this way several objects in one slide.
Now, my question is:
How can I move the pasted objects to the right position in
the Powerpoint Slide?
I am running the macro from Excel. Office2000.

Thanks!
 
B

Brian Reilly, MS MVP

Use the .top and .left properties to move the object (measured in
Points) as in

With appPPT 'after whatever reference you have to PPT

With ActiveWindow.Selection.ShapeRange
.top = 42
.left = 42
End With
End with

Brian Reilly, PowerPoint MVP
 
S

Steve Rindsberg

I have copied some parts of an excel table and paste them
in powerpoint as an image. This is the code (the macro is
run in Excel):
******************


Here's a variation on Brian's suggestion.
He'll tell you his is better.
That's the kind of guy he is.
I'll tell you that he's probably right. Unless he's not. ;-)

Dim oPPTShape as PowerPoint.Shape
Range("C10").Select
Selection.CopyPicture Appearance:=xlScreen, _
Format:=xlPicture
Set oPPTShape = PPSlide.Shapes.Paste
With oPPTShape
.Left = xx
.Top = yy
' and so on
End With
*****************
And I paste this way several objects in one slide.
Now, my question is:
How can I move the pasted objects to the right position in
the Powerpoint Slide?
I am running the macro from Excel. Office2000.

Thanks!

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 

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