bergsorensen
New Member
- Joined
- Jul 4, 2014
- Messages
- 26
I got a small snippet of code that, from a list, copy's a chart and paste it as a metapicture to powerpoint - 1 chart/picture on its own slide.
My issue is, im not able to generate a code that resizes/re-position (center align) the pasted picture.
Would anyone be able to give me a pointer of how?
Heres the cope-snippet:
For x = LBound(arrGraphs) To UBound(arrGraphs)
Graphtobeprinted = arrGraphs(x)
fromsheet= arrSheets(x)
'Create new powerpoint dias (12=empty)
Set pptSld = pptPres.Slides.Add(x, 12)
'Copy chart
Sheets(fromsheet).Select
ActiveSheet.ChartObjects(Graphtobeprinted).Activate
ActiveChart.ChartArea.Copy
'Paste chart
pptSld.Application.Activate
pptSld.Shapes.PasteSpecial DataType:=ppPasteEnhancedMetafile
'Resize and center/align
'???
Next
Thank you!!
Best
Kasper
My issue is, im not able to generate a code that resizes/re-position (center align) the pasted picture.
Would anyone be able to give me a pointer of how?
Heres the cope-snippet:
For x = LBound(arrGraphs) To UBound(arrGraphs)
Graphtobeprinted = arrGraphs(x)
fromsheet= arrSheets(x)
'Create new powerpoint dias (12=empty)
Set pptSld = pptPres.Slides.Add(x, 12)
'Copy chart
Sheets(fromsheet).Select
ActiveSheet.ChartObjects(Graphtobeprinted).Activate
ActiveChart.ChartArea.Copy
'Paste chart
pptSld.Application.Activate
pptSld.Shapes.PasteSpecial DataType:=ppPasteEnhancedMetafile
'Resize and center/align
'???
Next
Thank you!!
Best
Kasper