Bringing PowerPoint Show - .ppsm to front-VBForums
Results 1 to 8 of 8

Thread: Bringing PowerPoint Show - .ppsm to front

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    23

    Bringing PowerPoint Show - .ppsm to front

    Hi gents

    I'm wrinting some VB6 code, where i open a powerpont presentation show, which works great under debug mode, but as soon as I build the .exe and run the software, the ppsm file is behind the vb6 application.

    How can i bring the ppsm application to the front and maximised as a show?

    Can anyone help please, ta

    Jason

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    23

    Re: Bringing PowerPoint Show - .ppsm to front

    Just a note - I'm using Windows 7. I someone can help me it would be great, really need this working soon. Ta

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    4,034

    Re: Bringing PowerPoint Show - .ppsm to front

    Can we see your file export/save? Are you using ".ShowType = ppShowTypeKiosk"? In my use of PPT, I don't do ppsm's, just slide packs (ppt, pptx). All I do is is make it visible and it appears on top of all apps (including my VB)...So, if you could post your export routine, I might be able to assist.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    23

    Re: Bringing PowerPoint Show - .ppsm to front

    Sorr for late replay here is my code

    Code:
    'Option Explicit
    Dim WithEvents oPPTAppEvents As PowerPoint.Application
    Dim oPPTApp As PowerPoint.Application
    Dim oPPTPres As PowerPoint.Presentation
    Dim PresPath As String
    
       Set oPPTApp = CreateObject("PowerPoint.Application")
        
        If Not oPPTApp Is Nothing Then
            
            Set oPPTAppEvents = New PowerPoint.Application
            
            List1.AddItem "All slide show events are being monitored..."
            
            Txt_Data(4).Text = Format(Now(), "dd-mmm-yy hh:mm:ss")
            
            With oPPTApp
                
                Set oPPTPres = .Presentations.Open(PresPath, , , True)
                'Set oPPTPres = .Presentations.Open(PresPath, , , False)
    
                If Not oPPTPres Is Nothing Then
                    
                    oPPTPres.SlideShowSettings.Run
                
                Else
                    
                    MsgBox "The code could not open the specified file." & _
                            "Check if the file is present at the location.", _
                            vbCritical + vbOKOnly, "PowerPoint Automation Example"
                
                End If
            
            End With
        
        Else
            
            MsgBox "The code failed to instantiate PowerPoint session.", _
                    vbCritical + vbOKOnly, "PowerPoint Automation Example"
        
        End If

  5. #5
    PowerPoster
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,249

    Re: Bringing PowerPoint Show - .ppsm to front

    I would like very much to know how to do this, so then I am going to post and then find out for myself...
    Thanks, again!!
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
    Main Page: Click Here | Blog Page: Click Here | Products Page: Click Here | News Page: Click Here | Horoscopes Page: Click Here | My Games Section: Click Here | CodeBank Page: Coming Really Soon...

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    23

    Re: Bringing PowerPoint Show - .ppsm to front

    Mine works - It seems to work when I minimize all the forms, and then show them again afterwards! not sure if this is the best way though?

  7. #7
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    4,034

    Re: Bringing PowerPoint Show - .ppsm to front

    I put your code in a command button, changed one of your DIM statements (removed withEvents), changed your 'TRUE' option to false, and it works just fine.....try this in a commandbtn (changed the path/filename to YOURS)/

    Code:
    Dim oPPTAppEvents As PowerPoint.Application 'I REMOVED "WITHEVENTS"
    Dim oPPTApp As PowerPoint.Application
    Dim oPPTPres As PowerPoint.Presentation
    Dim PresPath As String
       Set oPPTApp = CreateObject("PowerPoint.Application")
        PresPath = App.Path & "\test.ppsx"   'CHANGE THIS TO THE PATH AND FILENAME OF YOUR PPT PRESENTATION
        If Not oPPTApp Is Nothing Then
             Set oPPTAppEvents = New PowerPoint.Application
    '        List1.AddItem "All slide show events are being monitored..."  'I COMMENTED OUT THIS, AND NEXT LINE, AS I DONT HAVE THESE CONTROLS ON MY FORM...YOU CAN LEAVE THEM UNCOMMENTED
    '        Txt_Data(4).Text = Format(Now(), "dd-mmm-yy hh:mm:ss")
            With oPPTApp
                Set oPPTPres = .Presentations.Open(PresPath, , , False)  'I CHANGED TRUE TO FALSE (LIKE YOU ORIG HAD-NEXT LINE)
                'Set oPPTPres = .Presentations.Open(PresPath, , , False)
                If Not oPPTPres Is Nothing Then
                    oPPTPres.SlideShowSettings.Run
                Else
                     MsgBox "The code could not open the specified file." & _
                            "Check if the file is present at the location.", _
                            vbCritical + vbOKOnly, "PowerPoint Automation Example"
                 End If
             End With
        Else
            MsgBox "The code failed to instantiate PowerPoint session.", _
                    vbCritical + vbOKOnly, "PowerPoint Automation Example"
        End If

  8. #8
    PowerPoster
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,249

    Re: Bringing PowerPoint Show - .ppsm to front

    Cool hey, that was really good. So then we can be able to make a PowerPoint Show work better for us, programmers!!
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
    Main Page: Click Here | Blog Page: Click Here | Products Page: Click Here | News Page: Click Here | Horoscopes Page: Click Here | My Games Section: Click Here | CodeBank Page: Coming Really Soon...

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.