View Full Version : To change the original size of a Excel sheet chart imported from Excel to PowerPoint
abiram01
07-17-2008, 09:06 AM
Hi All,
When a excel (Sheet chart) chart is imported to PowerPoint it will have certain values for width and height. This original sizes can be modified by opneing chart in edit mode and resizing the chart area in PowerPoint. When this is done, the font of the chart will not change.
I need to implement the same by PowerPoint VBA code. Please help me to implement this.
Regards,
Abhi
Not sure I understood what you mean.
Sub grapgModify()
ActivePresentation.Slides(The slide number).Shapes(the shape's index).Width = put the height value
ActivePresentation.Slides(The slide number).Shapes(the shape's index).Height = put the witdh value
ActivePresentation.Slides(The slide number).Shapes(1).Top = 20
End Sub
If you work with office version earlier the 2007' then you can record a macro, and see the script created when you manually change the graph dimentions, including the shape's index which I can't know in advance.
Erez
abiram01
01-07-2009, 06:50 AM
This will change the size but the original size is not changed..
Hi
Aviram
Something I found in Macro's help' that might help you.
</
ActivePresentation.Slides(1).Shapes.Title _ .TextFrame.TextRange.Font.Italic = TrueActivePresentation.Slides(1).Shapes.Placeholders(1) _ .TextFrame.TextRange.Font.Italic = TrueActivePresentation.Slides(1).Shapes(1).TextFrame _ .TextRange.Font.Italic = True />Try Font.size instead of Font.Italic like the example above.I don't know if there is a way to control all the shape's section (titles, axis) on the same time.So you might change each section separatelly.Hope it will help you.Erez
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.