A
Adam_needs_help
I have a macro that moves charts from excel into powerpoint. Now I need to
resize the pasted picture by a percentage and move it to another location on
the powerpoint slide. Here is the code I have:
'I am not using all of these, my code is modified from a few sources.
Dim objPPT As Object
Dim objPrs As Object
Dim objSld As Object
Dim shtTemp As Object
Dim chtTemp As ChartObject
Dim objShape As Shape
Dim objGShape As Shape
Dim intSlide As Integer
Dim blnCopy As Boolean
Set objPPT = CreateObject("Powerpoint.application")
objPPT.Visible = True
objPPT.Presentations.Open "C:...\test.ppt"
objPPT.ActiveWindow.ViewType = 1 'ppViewSlide
End If
'Select the RFQ Workbook
Workbooks("Total RFQs Per Buyer_Model By Aged 061209.xls").Activate
Sheets(PrgmName).Select
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, _
Format:=xlPicture
' Paste chart
objPPT.ActiveWindow.View.GotoSlide Index:=5 'ChartNum
objPPT.ActiveWindow.View.Paste
Once pasted I want to reduce the size to 94% of the original shape and then
move it to a new location (i don' t have the coordinates of that but I want
it centered horizontally and will have to determine the vertical position
later).
resize the pasted picture by a percentage and move it to another location on
the powerpoint slide. Here is the code I have:
'I am not using all of these, my code is modified from a few sources.
Dim objPPT As Object
Dim objPrs As Object
Dim objSld As Object
Dim shtTemp As Object
Dim chtTemp As ChartObject
Dim objShape As Shape
Dim objGShape As Shape
Dim intSlide As Integer
Dim blnCopy As Boolean
Set objPPT = CreateObject("Powerpoint.application")
objPPT.Visible = True
objPPT.Presentations.Open "C:...\test.ppt"
objPPT.ActiveWindow.ViewType = 1 'ppViewSlide
End If
'Select the RFQ Workbook
Workbooks("Total RFQs Per Buyer_Model By Aged 061209.xls").Activate
Sheets(PrgmName).Select
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, _
Format:=xlPicture
' Paste chart
objPPT.ActiveWindow.View.GotoSlide Index:=5 'ChartNum
objPPT.ActiveWindow.View.Paste
Once pasted I want to reduce the size to 94% of the original shape and then
move it to a new location (i don' t have the coordinates of that but I want
it centered horizontally and will have to determine the vertical position
later).