import powerpoint slides to access report

N

nathan_wilson

I have slides with images annotated with text that were created in
Powerpoint . I would like to add these slides into an Access report
programmatically using Access VBA.

In the past we manually copied the grouped shapes in the slide and
pasted them into an OLEbound control. The OLE pics were stored in the
database. The Access database is replicated across a WAN with about 40
people adding images/slides/pdfs to projects in the database so we have

decided to store the file paths in the database and the actual files on

a server. When a report is generated, the files need to be inserted in
a report with other data from the database.


I have tried turning the slides into .png files to insert into an image

control but the text becomes illegible even when increasing the size of

the slide five fold. If someone knows how to make snapshot files from
powerpoint, I'd like to integrate that capability with Lebans's
ReportToPDF utility by combining the report snapshot with the
Powerpoint snapshot before making the PDF.


Can one programmatically open a powerpoint file, copy the grouped
shapes, and paste the wmf into an OLEbound control during report
generation?
 
E

Eric Blitzer

If you are already familiar with storing the images in the database try
linking to the images instead. They can be stored on the server.
 
N

nathan_wilson

Maybe this is elementary to you all but I found the slickest way to do
this was to just use OLE to link the powerpoint file to an OLEbound
control. It's Microsoft's reward for sticking with their stuff.
I figured this stuff out from here:
http://support.microsoft.com/kb/q114214/

This code will display PNGs, PPTs, etc...
Add an OLEbound control into the report.

dim pptFile as string

pptFile = "C:\myfile.ppt"
OLEBound0.OLETypeAllowed = acOLELinked
OLEBound0.SourceDoc = pptFile
OLEBound0.Action = acOLECreateLink
 
S

Stephen Lebans

I didn't think you could do this for a report at runtime. What report Event
are you using?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
N

nathan_wilson

Eh..slight miscalculation on my part. I accomplished this in a form
thinking it should perform equally in a report. Not exactly. However,
Microsoft makes it possible here:
http://support.microsoft.com/?kbid=202056
It's working great now.

'---command button click event on form
OLEUnboundFRM.SourceDoc = fileName
OLEUnboundFRM.Action = acOLECreateLink
DoCmd.OpenReport RptName, acViewPreview

'--- header format event in report, OLEUnboundRPT is in header
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
Me!OLEUnboundRPT.OleData = Forms!frmMain!OLEUnboundFRM.OleData
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top