Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006
    Posts
    386

    Unanswered: Can I load a powerpoint slide on "Unload" or Exit of a command button

    Dear All,
    I have got a database which has many command buttons that do many tasks. But on command button is called "cmdexit" and my boss has asked me that when we click on the "exit" button to close that database, a powerpoint slide which we have created and is called "seeyousoon" should appear and exit after the slide finishes its animations.

    I would be very grateful to any help!.
    you may reply to emalloyal@hotmail.com as well.
    thank you for your time.
    Emi-UK
    Love begets Love, Help Begets Help

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Try something like

    command = "C:\program file\....power point .exe "C:\wherethefileis\filename.pps"

    dim ret
    ret = shell(command,??)

    just watch the """
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    May 2006
    Posts
    386

    It didnt work

    Thank you for your reply but could you please write to me how to write that code? Because when I copied and pasted your code behind the exit event procedure, it didnt work and that I get the lines in red.

    regards
    Emal
    Emi-UK
    Love begets Love, Help Begets Help

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    It been a long nite

    So

    Code:
    Sub test()
    Dim Powerexe As String
    Dim FileName As String
    Dim Ret
    Powerexe = "C:\Program Files\Microsoft Office\OFFICE11\POWERPNT.EXE"
    FileName = "C:\Documents and Settings\Debbie Mckillen\My Documents\Presentation1.ppt"
    
    exe = Chr(34) & Powerexe & Chr(34) & " " & Chr(34) & FileName & Chr(34)
    
    
    Ret = Shell(exe, vbMinimizedFocus)
    
    End Sub
    This should point you in the right place
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  5. #5
    Join Date
    May 2006
    Posts
    386

    Still not complete

    Thank you so much for your help. But when I put the codes on the exit event procedure of the command button, it does exit and then immediately after it opens the required powerpoint (pps) file but when it opens it, it is minimized and the slide show doesnt appear as a slide and it only appears as a normal page which is minimized.

    Is it possible that on exit event procedure of the exit button, the powerpoint (pps) file slide should open as a full screen slide and after the slide finishes its animations, it should then exit automatically.

    By the way, this is the code behind the exit button:

    Private Sub cmdExit_Exit(Cancel As Integer)
    Dim Powerexe As String
    Dim FileName As String
    Dim Ret
    Powerexe = "C:\Program Files\Microsoft Office\OFFICE10\POWERPNT.EXE"
    FileName = "\\NTSERVER\Users\ehaidari\My Documents\Emal's Docs\EXPRESSDB-OCT-05\GOODBYE.pps"

    exe = Chr(34) & Powerexe & Chr(34) & " " & Chr(34) & FileName & Chr(34)


    Ret = Shell(exe, vbMinimizedFocus)

    End Sub


    Your kind help would be much appreciated.

    regards
    Emal
    Last edited by Emal; 09-14-06 at 08:16.
    Emi-UK
    Love begets Love, Help Begets Help

Posting Permissions

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