Consulting

Results 1 to 6 of 6

Thread: Template won't open at startup in Word 2010 under Windows 8

  1. #1

    Template won't open at startup in Word 2010 under Windows 8

    I am trying to set up some templates/macros in Word 2010 on a friend’s Windows 8 computer. The macros were all prepared using Word 2003, and run fine in Word 2010 on a Windows 7 computer.

    For some unknown reason, one of the templates is not getting loaded at startup, though it is in the relevant startup folder, along with all the other templates. Any suggestions as to why not?

    If I subsequently open the template, and redo the references made to it by other the templates, it works fine as long as the template remains open.

    Does anyone have any idea why a template should not get opened at startup in Word 2010 under Windows 8, when it works fine under Windows 7?

  2. #2

    Update

    Later. When trying to load the offending template (StylesFixer.dot) at startup, Word 2010 under Windows 8 is giving the message "Runtime error 5. Invalid Procedure Call or Argument".

    I have found a workaround. I save StylesFixer.dot as *.dotm, delete the original *.dot template, redo all the references to the new *.dotm template by other templates, and all is then fine.

    But I'd still like to know what it is about StylesFixer that is causing the Invalid Procedure Call or Argument.

    The user on this particular computer does not have admin. rights. One of the routines in StylesFixer.dot does access the username & computer name - maybe it is something to do with that. But then, as a *.dotm template, it works fine.


    The problematic template (StylesFixer.dot / zipped) is attached, if anyone has a moment to look at it and see if they can spot what is invalid about it. Thanks. StylesFixer.Zip
    Last edited by johndavidson; 10-22-2015 at 08:26 PM.

  3. #3
    The add-in has a reference set to a missing template that you have not provided with the zip. If not present that will cause errors.
    There is an error in the line
    currDoc.ActiveWindow.Selection.Find.Font.Hidden = Hidden
    which should read
    currDoc.ActiveWindow.Selection.Find.Font.Hidden = True
    and there is an invalid call to a macro in your Test macro, but these should not cause the add-in to fail to load, and it does load here in Office 2010 and 2013, but it will cause it to fail when run.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  4. #4
    Thanks, I'll fix the errors. The 'missing' template is present in the actual collection of templates - and that template refs other templates ..., so that's not the issue.

    The test routine could probably do with deletion altogether. It's a long time since it was used.

    As you say, these would not cause problems when loading. The odd thing is that both the *.dot and *.dotm versions work fine, though the former has to be loaded manually once Word is running, and any refs to the template need resetting.

    The only thing I can think of is something in the ifJohnComputer routine, which accesses username and computer name - and the user does not have admin rights.

    The fact that it loads OK on your computer suggests that it is something to do with the computer/user configuration. But which version of Windows are you using? The problem has only surfaced in a Windows 8 configuration. I think that all other users of this suite of macros are using Win. 7 or earlier, and they have no problems.

    Somewhat off-piste, but d'you know whether Word 2003 & macros run under Windows 8 & 10, despite MS's warnings about incompatibility etc.?
    Last edited by johndavidson; 10-22-2015 at 09:52 PM. Reason: typos

  5. #5
    Tested in Word 2010 and Word 2013 running on Windows 7 and Word 2010 on Windows 10. It loads in all of them.
    Try changing the user's startup folder location and make it a trusted location.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  6. #6
    Thanks for testing it. So it is most probably an issue local to this computer and its user access/security/permissions settings. The conversion to *.dotm seemed to fix the problem, so will live with that for the time being.

Tags for 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
  •