Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default moving excel objects pasted as an image in Powerpoint

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

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default moving excel objects pasted as an image in Powerpoint

One way:

' Paste chart
PPSlide.Shapes.Paste.Select

' Align pasted chart
PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True
PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True

Another way:

' Paste chart
PPSlide.Shapes.Paste.Select

Set pptChartShape = opptapp.ActiveWindow.Selection.ShapeRange(1)
With pptChartShape
.ScaleWidth myScale, msoTrue, msoScaleFromMiddle
.ScaleHeight myScale, msoTrue, msoScaleFromMiddle
End With

The hard part is knowing how to refer to the pasted chart picture. Once you know that, you can
substitute positioning and resizing (.Left, .Top, .Width, .Height) for the .Align and .Scale
properties in my examples.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


Iker wrote:

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

Thanks!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix poor image quality when pasting from excel to powerpoint? Keith Charts and Charting in Excel 2 March 29th 10 06:33 PM
Embedded Excel Objects in PowerPoint resize after editing Barb Reinhardt Excel Discussion (Misc queries) 0 September 21st 09 06:41 PM
Linking Objects from Excel to PowerPoint Eric Excel Discussion (Misc queries) 0 January 22nd 09 11:39 PM
PowerPoint objects in Excel suzdapocho Excel Discussion (Misc queries) 0 March 25th 08 06:34 PM
Unable to remove objects pasted into Excel from HTML grid kydan47 Excel Worksheet Functions 3 July 22nd 06 07:59 PM


All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"