Results 1 to 9 of 9
  1. #1
    Star Lounger
    Join Date
    Sep 2001
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problems with dynamic loading of an add-in (Word XP)

    I have a very peculiar error here:
    When I try to load an add-in with VBA-code using "AddIns.Add", I get an error "File not Found" with some user profiles (other profiles will work just fine), even if path and filename are 100% correct. In contrast loading the add-in by hand is no problem and I have no problem listing the same file with a VBA "Dir()" command.
    To solve the problem, I have two questions:
    1) Is there any Word setting which allows disabling the dynamic loading of add-ins?
    2) We have a workaround by loading the add-in once by hand, since this will add the add-in to the list in Templates and Add-Ins/Global Templates and Add-Ins. Even if the add-in is not loaded automatically upon restart of Word, the entry remains in the "Templates and Add-Ins/Global Templates and Add-Ins"-list and the code will then successfully load it using AddIns.Add. (For business-specific reasons within this project we need the dynamic loading of the add-in and can not simply put the add-in in Word's startup folder.) Since there are many users, with this problem we are unfortunately unable to load it once by hand for everyone, so we tried to identify were the "Templates and Add-Ins/Global Templates and Add-Ins"-list entries are stored. However until now without luck. Does anybody know, where this setting is stored? (Which Registry Key? Which File?)

    Thanks in advance,
    hedgehog

  2. #2
    Star Lounger
    Join Date
    Sep 2001
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with dynamic loading of an add-in (Word XP)

    Question 2 is solved: In the meantime, I found out, that the list entries of Templates and Add-Ins/Global Templates and Add-Ins are stored together with other values in the registry key HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0WordDa ta as binary data. Since we can not distribute part of a key, I have to concentrate on point 1.

    This leaves question 1) Is there any Word setting which allows disabling the dynamic loading of add-ins?

    hedgehog

  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: Problems with dynamic loading of an add-in (Word XP)

    Nothing comes to mind for a Word setting under the circumstances you describe. Are you using a UNC (servershare) path or a mapped drive? Windows can be set up to map drives lazily, which could create problems for the second method.

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Problems with dynamic loading of an add-in (Word XP)

    Is there a difference in the permissions between the user profiles? For example, are all profiles administrators of their own machine?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    Star Lounger
    Join Date
    Sep 2001
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with dynamic loading of an add-in (Word XP)

    The IT administrators assure me, that all users have the same permissions. They should have the same Windows and Word settings, too. So it's just my idea, that a word setting might be involved.
    And we receive the path information by querying the workgroup template path. The workgroup template path is defined as UNC.

    Regards,
    hedgehog

  6. #6
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Problems with dynamic loading of an add-in (Word XP)

    Is there any automacros in the add-in which look externally for another file? Perhaps the add-in is found but it then runs a macro which goes looking for another file which some users don't get.

    To diagnose this problem you may need to step through the code on one of the problem user logins.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  7. #7
    Star Lounger
    Join Date
    Sep 2001
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with dynamic loading of an add-in (Word XP)

    That's exactly what I did. I stepped through the code with an non-working user profile. Unfortunately Word VBA simply tells me, that it can not find the file. (And I forgot to note down the exact error message, it was an error number 4xxx... <img src=/S/sad.gif border=0 alt=sad width=15 height=15> )

  8. #8
    New Lounger
    Join Date
    Jan 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with dynamic loading of an add-in (Word XP)

    If the AddIn has any dependencies the problem may be caused by the Windows Current Working Directory not being set to the location of the AddIn. I have had problems with this in the past using WLL style Word AddIns.

    To resolve this problem try using the following command before loading the add in

    Application.ChangeFileOpenDirectory "<enter path where add in is located here>"

    Using other Windows API's to change the current working directory may work as well but I know the above method fixed my problem.

  9. #9
    Star Lounger
    Join Date
    Sep 2001
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with dynamic loading of an add-in (Word XP)

    Hi Ben

    Thanks a lot for the idea. I will give it a try.

    Regards,
    hedgehog

Posting Permissions

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