abiram01
03-28-2009, 04:41 AM
Hi All,
I need to set the original width and height of a chart that is added to excel work book in a PowerPoint. Initially when i add the work book ole object am able to set the original width and height. But When the chart is added the width and height are changing. I had used the code below for adding this:
Dim xlCurrChart As Excel.Chart
Dim xlBook As Excel.Workbook
Dim pptShape As PowerPoint.Shape
Set pptShape = rpptTarget.Shapes.AddOLEObject(Width:=fDefaultWidth,
Height:=fDefaultHeight, ClassName:="Excel.Sheet")
Set xlBook = pptShape.OLEFormat.ObjectSet xlCurrChart = xlBook.Charts.Add()
Please advice me how to achive this
regards,
Abhi
I need to set the original width and height of a chart that is added to excel work book in a PowerPoint. Initially when i add the work book ole object am able to set the original width and height. But When the chart is added the width and height are changing. I had used the code below for adding this:
Dim xlCurrChart As Excel.Chart
Dim xlBook As Excel.Workbook
Dim pptShape As PowerPoint.Shape
Set pptShape = rpptTarget.Shapes.AddOLEObject(Width:=fDefaultWidth,
Height:=fDefaultHeight, ClassName:="Excel.Sheet")
Set xlBook = pptShape.OLEFormat.ObjectSet xlCurrChart = xlBook.Charts.Add()
Please advice me how to achive this
regards,
Abhi