Results 1 to 7 of 7
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    StartUpPath (97/2000)

    Hi all,

    Trying to install a global template on workstations with various OS and WD versions. I want the global template to be available to all users that log into the workstation (it contains macro's they need available in every Word session).

    The code below copies the template to a user's startup folder of Word:
    sThisPath="c:Test"
    sStartPath = Application.StartupPath & ""
    FileCopy sThisPath & "Correspondence System.dot", sStartPath & "Correspondence System.dot"

    What I would like to happen is that it is copied to an (sort of <g>) "all user startup path".

    What to do (with all these setups)?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: StartUpPath (97/2000)

    I take it you have multiple users, with different profiles, on a single machine. Since you use the term "workstation" I assume that you are connected to a network. You could have the user's login script check the network folder and update the local copy of your template if it has changed (rather than doing this in Word). Unless users have different Word startup requirements, you could have one folder on each workstation (outside of the user profile) set as the Word startup path. If possible in your networking software, give your login scripts write authority over this folder but not your users.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: StartUpPath (97/2000)

    There was a thread recently on the VBA board about determining the startup path from a program that did not use the Word object library. I'm not sure there was a 100% satisfactory solution posted, but it certainly would contain some hints. If you do go the login script route, you can access the registry with VBScript and the Windows Script Host. Although the code to sniff out all versions of office will be a bit repetitive, I'm sure it can be done.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: StartUpPath (97/2000)

    Hi Charles,

    <<Unless users have different Word startup requirements, you could have one folder on each workstation (outside of the user profile) set as the Word startup path. >>

    Can I set this path from within Word VBA ?
    I am not the network guy, just the poor soul that wrote the application. I wrote a small (Word) installation macro that copies a set of templates and the global template I am talking about here from a network location to the user's workstation. I'd be happy if I could specify an alternate startup folder that will "hold" for every user. Can I do this from Word VBA or do I really need to go the login scripting route for this?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  5. #5
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: StartUpPath (97/2000)

    Perhaps someone else can help with this. It's beyond my experience. I definitely think you're doing it the hard way. You would probably want to do this in a separate application. You would somehow be loading your macros, getting by the security settings, presumably from one startup folder, changing the startup folder (so your global will no longer load, since it is in the wrong folder now). You would want to make sure that any existing addins were copied to the new folder as well.

    BTW: You don't want to be surreptitiously changing people's folder settings. This sure sounds like virus behavior, not application behavior. Perhaps it is time to talk to the network guy?

    For the benefit of others, I'm posting Jonathon West's answer to your question (on the Microsoft newsgroups) here. Jonathon is much more knowledgable about this than am I.

    ---------
    This is one of the aspects of Word that isn't well documented. There is in fact a second startup path for all users. You can calculate it by this method
    <pre>strAllUserStartupPath = Options.DefaultFilePath(wdProgramPath) & _
    Application.PathSeparator & "Startup" & Application.PathSeparator
    </pre>

    If nothing has been installed there before, the folder may not exist, in which case you will have to create it.

    Also, take a look at this article.

    How to ensure (using VBA) that all your Word add-ins are installed in the correct path.
    Charles Kyle Kenyon
    Madison, Wisconsin

  6. #6
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Los Angeles, California, USA
    Posts
    289
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: StartUpPath (97/2000)

    Pardon my ignorance, but isn't this what the "workgroup templates" path is for?

  7. #7
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: StartUpPath (97/2000)

    Nope, the "workgroup templates" path is for a folder (with subfolders that become tabs) to hold document templates to be shared. It is usually on a shared network folder but can be on the user's own computer but distinct from the "user templates" folder.

    The startup folder is a folder to hold global templates. With Word 2000 + there are two startup folders for Word.

    See Template Basics (addbalance.com/usersguide/templates.htm) for more information on the different kinds of templates, where they are stored, and how to get them to show up under the File => New dialog.
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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