Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Display PowerPoint in Access 2007 Form with Transitions

Posted on 2011-03-21
9
Medium Priority
?
622 Views
Last Modified: 2012-06-27
I am using Access 2007 to create a kiosk application.  The main screen has an embedded powerpoint presentation which i have been able to automate so that it will play every x seconds.  I also have buttons that will do next, stop and previous so the user can easily navigate if they want to relook at a slide (typically advertisments)  The issue now is purely asthetics.  I would like the transitions to show and currently they do not.  I had to put an echo command in to elimiante the screen from going blank as it reloaded a slide.  I am happy where i am at but i know that the users would perfer to have the transitions that you get in powerpoint to display on the kiosks.
Private Sub Form_Load()
    On Error GoTo insertShow_Click_Error
    
    ' Open PowerPoint
    Dim strPowerPointFile As String
    Dim pptobj As PowerPoint.Application
    Set pptobj = New PowerPoint.Application
    pptobj.Visible = True
    pptobj.WindowState = ppWindowMinimized
    
    strPowerPointFile = "C:\Users\me\desktop\file.pptx"
    
    ' Fill a collection with all Slide IDs.
    With pptobj.Presentations.Open(strPowerPointFile)
        Set mcolSlideIDs = New Collection
              Dim ppSlide As PowerPoint.Slide
        For Each ppSlide In .Slides
            mcolSlideIDs.Add ppSlide.SlideID
        Next
        .Close
    End With
    
    ' Close PowerPoint
    pptobj.Quit
    Set pptobj = Nothing

    ' Make object frame visible and enable "navigation" buttons.
    pptFrame.Visible = True
  ' FirstSlide.Enabled = True
    'lastSlide.Enabled = True
    'nextslide.Enabled = True
   ' previousSlide.Enabled = True

    ' Specify OLE Class, Type, SourceDoc, SourceItem and other properties.
    With pptFrame
        .Class = "Microsoft Powerpoint Slide"
        .OLETypeAllowed = acOLELinked
        .SourceDoc = strPowerPointFile
                 

    End With
    SetSlide 1
    
     
    Exit Sub

insertShow_Click_Error:
    MsgBox Err.Number & " " & Err.Description
    Exit Sub
End Sub

Open in new window

0
Comment
Question by:thwinward
[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
  • 5
  • 4
9 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35184789
Why the need for the MS Access "Container"?
IMO, it just seems like too many machinations to get this custom functionality...

To do what you are asking it would seem that you would also need to specify the Transition, so see here:
http://msdn.microsoft.com/en-us/library/aa221452%28v=office.11%29.aspx


Why not save the PP file as a  "Show" ("YourFile.ppsx")
Then simply open it from within Access using code similar to this:

    Application.FollowHyperlink "c:\YourFolder\YourFile.ppsx"


Or just run the PP show directly in Kiosk mode without MS Access?

JeffCoachman
0
 

Author Comment

by:thwinward
ID: 35185433
The idea was that i have a form that has a card swipe input at the top and the PPT is playing in a window within the form vs full screen mode so it is in an unbound framed object.    The code given above would work if i was running PPT standalone but not from the framed object.  
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35185626
Then I know of no easy way to do this.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:thwinward
ID: 35186058
The only thing i am seeing now is that when in full screen maximized mode i am getting a lot of flickering is there an easy way to stop the screen refreshing from doing this?  I was wondering if you could play a pps in a internet exploer active X window...
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35186108
In Access you can turn of the screen before the flicking:

    Application.echo False

Then turn it back on afterwards:
   
    Application.echo True

I'm just guessing, ...but it might be something like this in your code.

For Each ppSlide In .Slides
    Application.echo False
    mcolSlideIDs.Add ppSlide.SlideID
    Application.echo True
Next

Here my guess is that before the slide is added, turn off the screen
then after it is added turn the screen back on.


I see that you posted code with error handling...
That's good because in the event of any error you want to "immediately" turn the screen back on.
If not, ...real "Weirdness" will occur...
:-O

insertShow_Click_Error:
    Application.echo True
    MsgBox Err.Number & " " & Err.Description
    Exit Sub


JeffCoachman
0
 

Author Comment

by:thwinward
ID: 35186276
OK so maybe the powerpoint isn't the answer:)   What is the easiest way to embedd a AVI or MP4 Video into a form in your opinion?
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 35186695
Insert the MS Media player in a form.

Then use code like this to play a file:

Dim strFile As String
strFile = "C:\Documents and Settings\user\My Documents\My Music\SomeVideo.avi"
Me.objWMP.Object.URL = strFile

I am not sure that WMP supports playing all avi and mp4 files natively, ... you may have to download a codec
See here for more info:
http://support.microsoft.com/kb/316992

I'm still using WMP 9, the current version is 12 so these types may very well be supported...




0
 

Author Closing Comment

by:thwinward
ID: 35186735
I think i may have being trying to square peg a round hole so your comments gave me the guidance i needed.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35186772
;-)
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

610 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