online 1
gast (50)

/ Forum / Datenbanken

DatenbankenDatenbanken

Fragevon Booyeoo vom 07.05.2019, 15:00 Options

Pivotchart von Acces nach Powerpoint

Hallo,

hat jemand eine Idee oder Ansatz wie ich aus einer AccessAbfrage einen PivotChart in eine PowerPoint Präsentation einbinden könnte?
Momentan bin ich soweit dass ich Texte aus einer Tabelle ausgeben kann, für das Pivotchart fehlt es jedoch an den VBA Kenntnissen.

Das ist das was ich momentan habe:

Option Compare Database
Option Explicit

Sub cmdPowerPoint_Click()
    Dim db As Database, rs As Recordset             'new vars db = Database & rs = Recordset
    Dim ppObj As PowerPoint.Application             'new var ppobj = PP.Application
    Dim ppPres As PowerPoint.Presentation           'new var ppPres = PP.Presentation
    
    On Error GoTo err_cmdOLEPowerPoint              'Errorhandling
    
    ' Open up a recordset on the Employees table.
    Set db = CurrentDb                                      'Current DB is set as source
    Set rs = db.OpenRecordset("User", dbOpenDynaset)        'Open DB Table with OpenRecordset and add the Table
    
    ' Open up an instance of Powerpoint.
    Set ppObj = New PowerPoint.Application                  'inize ppObj
    Set ppPres = ppObj.Presentations.Add                    'inize ppPres with ppObj.Presentations
    
    ' Setup the set of slides and populate them with data from the
    ' set of records.
    With ppPres                                             ' PPres is fed with data from rs
        While Not rs.EOF                                    ' Going through whole rs
            With .Slides.Add(rs.AbsolutePosition + 1, ppLayoutTitle)                            'adding all slides and text
                .Shapes(1).TextFrame.TextRange.Text = "Hi! Page " & rs.AbsolutePosition + 1     'set title text on slides
                .SlideShowTransition.EntryEffect = ppEffectFade                                 'set effect when changing page
                With .Shapes(2).TextFrame.TextRange                                             'adding text
                    .Text = CStr(rs.Fields("Lastname").Value)                                  'get text from table
                    .Characters.Font.Color.RGB = RGB(255, 0, 255)                               'set color of text
                    .Characters.Font.Shadow = True                                              'set text properties
                End With
                .Shapes(1).TextFrame.TextRange.Characters.Font.Size = 50                        'set font size
            End With
            rs.MoveNext                                                                         'Move to next record
        Wend
    End With
    
    ' Run the show.
    ppPres.SlideShowSettings.Run
    
    Exit Sub
    
err_cmdOLEPowerPoint:                                                                           'Errorhandling
    MsgBox Err.Number & " " & Err.Description
End Sub


Danke für jede Hilfe
Grüße


Antwort schreiben

Ähnliche Themen

Zuerst PowerPoint 2007 zu Flash Konverter
W.Peterson  11.07.2007 - 102 Hits -

acces point gefunden doch seiten laden nicht
schnuppe  02.08.2007 - 61 Hits - 3 Antworten

PivotChart- Bericht
wim  25.08.2007 - 19 Hits - 6 Antworten

Hinweis

Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

Neue Einträge

Version: supportware 1.9.150 / 10.06.2022, Startzeit:Mon Jan 26 09:21:55 2026