Supportnet Computer
Planet of Tech

Supportnet / Forum / Datenbanken

Pivotchart von Acces nach Powerpoint





Frage

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: [code]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[/code] Danke für jede Hilfe Grüße

Antwort von



Ich möchte kostenlos eine Frage an die Mitglieder stellen:


Ähnliche Themen:


Suche in allen vorhandenen Beiträgen: