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

    Unanswered: Can I load a powerpoint (pps) slide on Onunload or Exit event of a command button?

    On my database and on "Exit" button 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 automatically 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 automatically exit.

    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
    __________________
    Emal Emal
    Please reply to:
    Email: emalloyal@hotmail.com
    Emi-UK
    Love begets Love, Help Begets Help

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Ret = Shell(exe, vbMinimizedFocus)

    As indicated in the constant's name, you are telling it to execute the command line with the window "Minimized".

    Look up Shell in the help file for information on this and other choices for the constant.

    As for the second question, exiting power point following a series of animations requires putting code in power point. Google is your friend - you'll need to create a class and then code within the class.

    tc

  3. #3
    Join Date
    May 2006
    Posts
    386
    Are you suggesting that if I change " Shell(exe,vbMinizedFocus " to "MaximizedFocus" will do the trick?
    Emi-UK
    Love begets Love, Help Begets Help

  4. #4
    Join Date
    May 2006
    Posts
    386
    Yes, the maximized window worked. BUT I would still be very, very thankful if you could please give me any idea which code to put behind the Powerpoint or Database so that the powerpoint (pps) file closes after the animations finish its timings?

    Thanks for your time.
    Emi-UK
    Love begets Love, Help Begets Help

  5. #5
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    To code behind Powerpoint, you need to create a class module.

    HERE is some information I researched a while back, in another thread.

    The help file in Powerpoint, MSDN.Microsoft.com and Google are my sources - I did enough research to produce the above referenced thread - I have not otherwsie done any coding in Powerpoint.

    Good luck,
    tc

  6. #6
    Join Date
    May 2006
    Posts
    386
    Thank you for your efforts. I will give it a try and will probably have to go through help menues of powerpoint and access in order to fimiliarize myself with both especially entering codes in powerpoint as I have never done this before. I will let you know of my progress. But I really would like to thank you for all your effort. Thanks again.
    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
  •