Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jan 2009
    Location
    Auburn, California, USA
    Posts
    24
    Thanks
    0
    Thanked 1 Time in 1 Post

    Using ENV vars in PPT (2003/SP3)

    I want to make use of the %HOMEDRIVE% and %HOMEPATH% environment variables in the Action Settings > Run field connected to a button on a slide. Unfortunately, I've been unable to use these with any success. The M$ KB has an article talking about a hotfix, which I downloaded and installed. Even after a reboot, I can't get PPT to recognize environment variables in the Action Settings > Run field.

    Any ideas?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Using ENV vars in PPT (2003/SP3)

    Welcome to Woody's Lounge!

    As far as I know, you can't use environment variables in the Run field.

    You could create a macro that does what you want, and call that macro in the action settings. In VBA code you can use the Environ function to get the value of environment variables, for example

    Environ("HomeDrive")

    returns the value of the HOMEDRIVE environment variable.

  3. #3
    New Lounger
    Join Date
    Jan 2009
    Location
    Auburn, California, USA
    Posts
    24
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Using ENV vars in PPT (2003/SP3)

    Here's the problem: each PPT slide features two buttons. One button opens a PDF to a given page, while the other opens an exercise<n>.PDF displayed on one-half of the screen, a URL displayed in the browser in the other half of the screen. Both macros accept user input and are complied as EXEs.

    I know how to code all of this in Wilson WindowWare's long-standing Winbatch scripting toolset, but haven't the time to teach myself how to do it in VBA.

    The PPT will be run on hundreds of PCs. Having the script determine the path to the My Documents subfolder is important, hence my interest in %HOMEPATH%.

    As it stands, unless the instructor launches the PPT from the same subfolder in which the macros also reside, I cannot get this to work across multiple PCs.

    Ideas?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Using ENV vars in PPT (2003/SP3)

    Telling the instructors to place the compiled scripts and the presentation in the same folder appears to be the way to go to me; that way it should always work.

Posting Permissions

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