PC Review


Reply
Thread Tools Rate Thread

Control PowerPoint from Access

 
 
=?Utf-8?B?UkFN?=
Guest
Posts: n/a
 
      4th Apr 2006
I have been able to create a PowerPoint presentation using the following
code. The code below shows how to create a presentation using one field
(text field) but I would like to include Images in the presentation. If
anyone can explain to me how to use multiple fields and insert images that I
have stored in my database I would be most appreciative.


Thanks in advance for any help.

Dim db As Database, rs As Recordset
Dim ppObj As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation

'On Error GoTo err_cmdOLEPowerPoint

' Open up a recordset on the Employees table.
Set db = CurrentDb
Set rs = db.OpenRecordset("VideoTable", dbOpenDynaset)

' Open up an instance of Powerpoint.
Set ppObj = New PowerPoint.Application
Set ppPres = ppObj.Presentations.Add

' Setup the set of slides and populate them with data from the
' set of records.
With ppPres
While Not rs.EOF
With .Slides.Add(rs.AbsolutePosition + 1, ppLayoutTitle)
.Shapes(1).TextFrame.TextRange.Text = "Hi! Page " &
rs.AbsolutePosition + 1
.SlideShowTransition.EntryEffect = ppEffectFade
With .Shapes(2).TextFrame.TextRange
.Text = CStr(rs.Fields("QUES").Value)
.Characters.Font.Color.RGB = RGB(255, 0, 255)
.Characters.Font.Shadow = True
End With
.Shapes(1).TextFrame.TextRange.Characters.Font.Size = 50
End With
rs.MoveNext
Wend
End With

' Run the show.
ppPres.SlideShowSettings.Run

Exit Sub

err_cmdOLEPowerPoint:
MsgBox Err.Number & " " & Err.Description


--
AccessRAM
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Powerpoint 2007 - Error when attempting to access Powerpoint optio taibooz Microsoft Powerpoint 2 30th Mar 2010 12:49 PM
Viewing & access speed of Powerpoint 2003 files with Powerpoint 20 Khai Microsoft Powerpoint 2 16th Jun 2009 05:05 AM
PowerPoint Control Rajesh Birelly Microsoft Powerpoint 1 16th Mar 2004 01:36 PM
Re: PowerPoint Control Glen Millar Microsoft Powerpoint 0 16th Mar 2004 12:05 PM
Use of control+d in PowerPoint Robert Mark Bram Microsoft Powerpoint 10 10th Jul 2003 11:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:49 AM.