MSGraph.Chart.8 (hard)

How (if possible) update the title in a MSGraph.Chart.8 in a Power Point Presentation by code in Ms Access.  I already make a procedure that update the chart in PowerPoint with the data in the Rowsource of my Ms Access chart.

Sorry to not give more point, I don't have more then it.  To the personne who find me a solution I will give more point later.

Note: i will not give the point to the persons who is telling me that is not possible
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

jason_lewisConnect With a Mentor Commented:
Teach, and be taught :-) I'm glad I could help this time.  --J

(If I ever find some spare time, I might actually use this information myself -- to automate a handful of graphs that I still do by hand...yuck...)
Ghis68Author Commented:
The procedure read the object in My Report find the Chart Name, and the RowSource and retreive a chart in My PowerPoint Presentation with the same name and update each cell by the RowSouce of the Ms Access chart.  

Portion of the code
    Set OPwrPnt = CreateObject("Powerpoint.application")
    Set OpwrPresent = OPwrPnt.Presentations.Open(CGFF_PPTFileName)
    For lstSlide = 1 To OpwrPresent.slides.Count
        For Shpcnt = 1 To OpwrPresent.slides(lstSlide).Shapes.Count

' Check if shape is an OLE object.
         If OpwrPresent.slides(lstSlide).Shapes(Shpcnt).Name = ObjectName Then
            If OpwrPresent.slides(lstSlide).Shapes(Shpcnt).Type = 7 Then

' Check if OLE object is graph 8 object. The ProgID is case sensitive.
                If OpwrPresent.slides(lstSlide).Shapes(Shpcnt).OLEFormat.ProgID = "MSGraph.Chart.8" Then
                    Set shpGraph = OpwrPresent.slides(lstSlide).Shapes(Shpcnt).OLEFormat.Object
                    ' Found the graph.
                   FndGraph = True
                End If
            End If
         End If
        Next Shpcnt
    Next lstSlide

What I need to know is
... and "yes, it's probably possible..." is it acceptable ? (Sorry, I couldn't resist !)   DS
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

I don't know your answer, but I think I might be able to help you find it. Try this. (If you haven't already.)

1) Set a breakpoint on the line AFTER the one that reads "Set OpwrPresent = OPwrPnt.Presentations.Open(CGFF_PPTFileName)" (F9)
2) Run the procedure (F5 -- unless you have to run it from a form)
3) When the program breaks, open the debug window. (Ctrl-G)
4) Find the OpwrPresent variable in the Locals Pane (top half of the debug window).
5) Press the expand ('plus') symbol next to that variable. This will show you all of the available objects/properties for the presentation -- with their current values.
6) Find the property that has a value that is the same as the name you want to change. (You might need to expand the objects inside that object, too.) When you find the line with that value, that will be the name of the property you need.

If that doesn't work, you can also try browsing through the object browser (F2) to find the appropriate property. Just change the library from <All Libraries> to PowerPoint. (Otherwise you'll have to look through more than a few objects & properties.)

Ghis68Author Commented:
Post your answer

the structure is
                    Set shpGraph = OpwrPresent.slides(lstSlide).Shapes(Shpcnt).OLEFormat.Object
                    ' Found the graph.
                   ' two line add in my code
                   shpGraph.Hastitle = True
                   shpGraph.ChartTitle.Caption = "Builds Title"
I see whit your answer that I am not using the watch enough but now !!!
Whit your answer, I will be able to send chart from Access in Power Point add put a Title that reprensent the parameters in Access use to select the data.
You make my life ...
Ghis68Author Commented:
Adjusted points to 50
All Courses

From novice to tech pro — start learning today.