Changing MS Graph font with VBA

R

Roderick O'Regan

I want to change the chart area font face of a graph in PP.

Selecting the chart I apply the following procedure:

Sub ChangeFont()
Dim oChart As Chart
Set oChart = ActivePresentation.Slides(1).Shapes(1).OLEFormat.Object
oChart.ChartArea.Font.Name = "gillsans"
' Update the graph and quit the graph application
oChart.Application.Update
oChart.Application.Quit
End Sub

This gives me an error in the Set oChart... line: "the index into the
specified collection is out of bounds".

All indications show that I could change this property but I'm having
difficulty stitching it all together.

Can anyone point me in the right direction, please.

Roderick O'Regan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top