Consulting

Results 1 to 6 of 6

Thread: Get "Startup" Folder Location

  1. #1
    VBAX Mentor clhare's Avatar
    Joined
    Mar 2005
    Posts
    470
    Location

    Get "Startup" Folder Location

    In Word 2010, we use the following code to reference the folder the user has set as the "startup" folder on their machine. This way the macro can go to the correct location no matter which folder an individual user has set up as their "startup" folder (different groups are using different locations).

    Application.StartupPath
    I need to do the same thing in PowerPoint 2010, but found that "Startuppath" doesn't exist under "Application". Is there another way I can get the macro to find the location of the "startup" PowerPoint template? Again, different groups use a different location, and I'm trying to avoid having to do a IF statement that lists all of them out.

    Thanks!

    Cheryl

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    You probably need to explain what you mean by PowerPoint StartUp folder.

    StartUp folders only really exist in Excel and Word AFAIK
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Mentor clhare's Avatar
    Joined
    Mar 2005
    Posts
    470
    Location
    By "startup" folder, I am referring to a specific location that the user has copied the global PowerPoint template that we provide for creating presentations in a format that all can use. Not every group uses the same location. In Word, we got around that by using "application.startuppath" in the macros. I don't know if there's a way to do something similar in PowerPoint or if we have to specifically set up the macros for each possible location using an IF statement.

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    So are you saying you have users that have their default (custom) template stored somewhere other than <APPDATA>\Microsoft\Templates and it loads automatically at startup?

    I would have said that was impossible! If you can do this please tell us how. I don't think .StartUpPath necessarily gives you the path to the template either. Does ActiveDocument.Attachedtemplate.Path give the same answer? These methods do not exist in PowerPoint but that because there is really only the one default place to put templates for auto load (and even so you would have to name them "Blank"

    If your aim is to have macro enabled POTM templates in PowerPoint be warned this is not a great idea and works (and I use "works" loosely!) in a totally different way to Word and Excel.

    If you have code to load the company template you should train your users to use the same location.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Mentor clhare's Avatar
    Joined
    Mar 2005
    Posts
    470
    Location
    We have a Word template that loads automatically at startup, regardless of which startup path they use. We accomplished this by changing the "StartUWord 2010 default location: StartUp" to the folder where they've stored our template in the Trusted Locations and then also making that template a Word Add-In Template. Some people use the C drive, some use D, some use AppData, so Application.Startuppath is working for us in figuring out which path they setup as their default Startup location.

    I was hoping there was a way to do that in PowerPoint as well, but it doesn't sound like there is. I guess I'll have to do the IF statement and account for specific storage locations.

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Just bear in mind what I said about macro enabled templates in PPT. There are easier ways to cause yourself pain!
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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