Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Location
    Santa Ana, California, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Configure Macro for Word 2000 (US/Office 2000 SR-1/ Windows XP)

    Ok, here is the situation. We have Office 2000/running on Windows XP. Our IT dept loads up the software to the CPU and then our dept supports the actual software. As you know, Word 2000 creates a "user profile" for each user when they sign into the machine - if they log into another machine it creates another profile on that machine. Now the goal is to write a configure macro so that it configures Word the way we want it. (Ok, yes, we change the look of Word, add macros, add templates, set formatting standards, set the writing style to Technical, etc.)

    The problem is this: because Word 2000 creates a specific "user profile" I'm attempting to figure out a way to identify the specific user since the directory where things like the Normal.dot and our toolbar.dot are located as follows - c:documents and settingsUSERNAMEApplication DataMicrosoftTemplates and startup, respectively. Since our "configure macro" tells it to go out to the server, grab the specific files, it doesn't know where to put them because of the USERNAME changing for each person.

    Is there a way in VB to determine the USERNAME and set this information inside another nested macro to send the files to the correct place as well as set the "File Locations" in Word where we need them to look for things?

    And yes, I know that if all this was done at the "Default User" level we wouldn't have to worry about it, however, our IT dept doesn't do this and do to politics we have to figure out the work around them.

    Any suggestions would be greatly appreciated!
    <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Configure Macro for Word 2000 (US/Office 2000 SR-1/ Windows XP)

    The following code should output a list of all the active SpecialFolders to the immdeiate screen.<pre> Dim oWSH
    Set oWSH = CreateObject("WScript.shell")
    For Each sf In oWSH.SpecialFolders
    Debug.Print sf
    Next
    Set oWSH = Nothing</pre>

    To return the path to a specific folder such as Templates, you can use oWSH.specialFolders("Templates"). It does not seem to like spaces, so the get My Documents you need to use oWSH.specialFolders("MyDocuments").

    Andrew C

  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Configure Macro for Word 2000 (US/Office 2000 SR-1/ Windows XP)

    Another alternative might be code like this:

    <pre>Sub ReturnTemplatePaths()

    Dim strStartupDirectory As String
    Dim strWorkgroupDirectory As String

    strStartupDirectory = Options.DefaultFilePath(wdStartupPath)
    strWorkgroupDirectory = Options.DefaultFilePath(wdWorkgroupTemplatesPath)

    MsgBox "Startup directory is: " & strStartupDirectory _
    & vbCr & "Workgroup templates directory is: " & strWorkgroupDirectory

    End Sub
    </pre>

    Gary

  4. #4
    New Lounger
    Join Date
    Nov 2001
    Location
    Santa Ana, California, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Configure Macro for Word 2000 (US/Office 2000 SR-1/ Windows XP)

    Thanks for the suggestions, I'm working on the macros today. <img src=/S/hiding.gif border=0 alt=hiding width=70 height=24>

  5. #5
    New Lounger
    Join Date
    Nov 2001
    Location
    Santa Ana, California, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Configure Macro for Word 2000 (US/Office 2000 SR-1/ Windows XP)

    HA HA HA - Figured out a way around the problem. I finally got the macro to go out to the server, grab a folder, copy it to the DEFAULT USER folder. Takes the normal.dot, toolbar.dot, custom dictionary, startup files and everything. User closes word and reopens and POOF everything is there, macros and all and then they push another macro to configure Word 2000.

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Configure Macro for Word 2000 (US/Office 2000 SR-1/ Windows XP)

    An observation and a question: if users do not have admin permission on the local WinXP machine, the copy routine won't work. If users do have admin permission to the local folder structure (other than their own proflle), why?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    New Lounger
    Join Date
    Nov 2001
    Location
    Santa Ana, California, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Configure Macro for Word 2000 (US/Office 2000 SR-1/ Windows XP)

    *Grin* Don't ask! It is a decision that IT made and we are a different dept that supports the actual software, not the operating system.

Posting Permissions

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