Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    New York, New York, Lebanon
    Thanked 1 Time in 1 Post

    A Couple of Questions before design (MS-Word 97 and >)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Loungers

    I was asked to develop some customized utilities for MS-Word. These are supposed to work any time MS-Word is active.

    For that I was thinking that if I put the code in the Normal.DOT template, it will take care of this. But I got to think, what if the user has customized Normal.DOT, I can't simply replace his/her with mine. People will be upset.

    So I thought OK, maybe I will add the code via some process. Maybe read a text file and paste it, maybe add a module. I like adding a module, because this way if there are upgrades then I simply need to remove the old module and add the new one with the new stuff.

    But how many modules can I add before this becomes a problem. Potentially I could develop 100s of these utilities for 100s of requestors. Oh I am starting to hate my job... <img src=/S/sad.gif border=0 alt=sad width=15 height=15> <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

    Or should have a document in the Startup folder that I will control by adding and removing modules.

    Thanks for any advice.

    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    3 Star Lounger
    Join Date
    Apr 2004
    Boston, Massachusetts, USA
    Thanked 0 Times in 0 Posts

    Re: A Couple of Questions before design (MS-Word 97 and >)

    It sounds like you'd be best off putting your code into a template, and then putting that template into users' Startup folder. When you do that, the template loads every time Word is started. Whenever you needed to upgrade, just replace the template with the new version.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Los Angeles Area, California, USA
    Thanked 0 Times in 0 Posts

    Re: A Couple of Questions before design (MS-Word 97 and >)

    I am not a VBA expert, but I can tell you that the usual method is to create either a template that is in the startup folder which contains the customizations that you want or to create a COM add-in. You are correct that if you replace a user's with your own that they will be least if they have any inkling of how to use Word.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: A Couple of Questions before design (MS-Word 9

    With respect to distributing solutions internally, what I typically do involves three parts.

    1. <LI>Template to be installed (e.g., newtoolsdot);
      <LI>Template containing an installer (e.g.,;
      <LI>Document containing brief instructions, attached to the installer template (e.g., howto_newtools.doc)
    The installer template has some generic code, the only thing that changes from project to project is the target template. Here's an example:
    <pre>Option Explicit
    Sub Install_jfsTools()
    ' Change this for new installers
    Const strTargetTemplate = ""
    Const strTargetTemplatePath = "serversharetemplates"

    ' Confirm user wishes to continue
    If MsgBox("Install " & strTargetTemplate & " on your computer?", _
    vbYesNo + vbQuestion, strTargetTemplate & " Installer") <> vbYes Then
    MsgBox "Ciao!"
    Exit Sub
    End If

    Dim strUserStartUpPath As String
    strUserStartUpPath = Options.DefaultFilePath(wdStartupPath)

    ' Copy the template to the user template folder
    FileCopy strTargetTemplatePath & "" & strTargetTemplate, _
    strUserStartUpPath & "" & strTargetTemplate

    'Load the template & refresh the display to show commandbar changes
    AddIns.Add strUserStartUpPath & "" & strTargetTemplate, Install:=True

    MsgBox "Done! If you encounter problems with the " & _
    strTargetTemplate & " template, see Jefferson.", _
    vbInformation + vbOKOnly, strTargetTemplate & " Installer"
    End Sub</pre>

    Note: I deleted some extra code out of that, so apologies if it doesn't work exactly right...

    Users who want to install the template simply open the documentation and click a menu or toolbar control to run the install procedure.

    Hope this helps.

Posting Permissions

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