Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Template installer (Word 97-2007)

    Is there a way to make an installer, using anything, that would search all hard drives to find folder with normal.dot in it, and then copy your template to the folder normal.dot was found in?

    Any examples of that around? I searched Web through and through and found nothing of the sorts.

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

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

    Re: Template installer (Word 97-2007)

    There may be several folders that contain Normal.dot. If you want to copy a template to the user templates folder for the current user, you can use

    Options.DefaultFilePath(wdUserTemplatesPath)

    to retrieve the path of that folder. You could use combine this in a macro with the FileCopy instruction to copy the template to the correct folder.

  4. #3
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Template installer (Word 97-2007)

    Yes, of course. Easy when user has macros enabled but what if he or she doesn't?

    I obviously did not make myself clear. I meant an installer outside of Word itself, and not dependent of whether macros are enabled or not.

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

    Re: Template installer (Word 97-2007)

    That's outside my field. I hope someone else can help you with that.

  6. #5
    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: Template installer (Word 97-2007)

    The free program InnoSetup can run scripts written in Pascal (or a Pascal-like language). If you can cobble together a little Pascal program, you probably can get free run of the computer! So far I've only used the following type of command to place a template in the standard user templates folder, and an OCX file in the system32 folder if the user does not have it.

    <code>[Files]
    Source: "TimeRpt6G.dot"; DestDir: "{userappdata}MicrosoftTemplates"
    Source: "C:WINDOWSsystem32mscomct2.ocx"; DestDir: "{sys}"; Flags: onlyifdoesntexist sharedfile uninsneveruninstall regserver</code>


    (Note: Source refers to the location on my PC on which I build the install file, relative to the install script file; DestDir is on the target computer.)

  7. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Template installer (Word 97-2007)

    You can retrieve the user templates path from the registry. You do need to know the Office version though, since the path depends on the Office version. For example: the user templates path for Office XP, which has internal version number 10.0, is stored in

    HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0Common GeneralUserTemplates

  8. #7
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Template installer (Word 97-2007)

    Thank you for your reply.

    Just one question: what if I do not know the exact path of the user templates folder on the target computer, because it may be a non-English version of Windows?

  9. #8
    New Lounger
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Template installer (Word 97-2007)

    No, you can not. That path will only be there, in the registry, if user changed the default user templates folder. Otherwise it won't.

    (I tried a lot and would think it is impossible to detect on Any Computer, but apparently it is, plus even the version of the Word. See http://texticweb.com/shop/downloads.html, for this rather simple but working little installer, Installer.exe -- choose "Toolbar for Microsoft Word (PC) [1315 kb]".)

  10. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Template installer (Word 97-2007)

    Evidently you know much more about this than I do, so I'll withdraw humbly from this thread.

Posting Permissions

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