Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MSGraph.Chart.8 (hard)

Posted on 1999-07-22
6
Medium Priority
?
389 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:Ghis68
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 1

Author Comment

by:Ghis68
ID: 2001431
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")
    OPwrPnt.Activate
    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
OpwrPresent.slides(lstSlide).Shapes(Shpcnt).OLEFormat.Object.??????????????
0
 
LVL 3

Expert Comment

by:dsegard
ID: 2001432
... and "yes, it's probably possible..." is it acceptable ? (Sorry, I couldn't resist !)   DS
0
 
LVL 1

Expert Comment

by:jason_lewis
ID: 2001433
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.)

0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 1

Author Comment

by:Ghis68
ID: 2001434
Jason_lewis
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 ...
0
 
LVL 1

Accepted Solution

by:
jason_lewis earned 200 total points
ID: 2001435
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...)
0
 
LVL 1

Author Comment

by:Ghis68
ID: 2001436
Adjusted points to 50
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question