Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Feb 2008
    Location
    Beckenham, United Kingdom
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Install Add-In using VBA (2003 SP3)

    Hi All

    Asking for help again - and a huge thanks in advance. Don't know what I'd do without you.

    I have a number of templates in Word's startup path (local drive) & which are therefore loaded when Word starts. When I look at Tools, Template & Add-ins, all these files are checked, as you would expect. I need to do one of two things: Sometimes I need to un-check one of the templates, copy down a revised one from a network backup to the local drive and then tick it again. I can make that work fine. However, sometimes the template in question wasn't in the startup path in the first place and I need to get it from the network & check it. Can't make that work - I can copy the file down and I can see it in the add-ins list but I canot make it checked. (So basically, if the file was there in the first place I can make it work but not if it wasn't there to start with - almost as though I need to 'refresh' the add-ins collection). Can anyone tell me what I'm doing wrong, please? I feel as though I must be missing a step - although if I record checking the add-in manually, I get more or less the line shown below as Option 1. (I've tried this on XP & Vista). Option 2 was another attempt.

    Option 1:
    Addins("MyTemplate.dot").Installed =True

    Option 2:

    For EachMyAddin In AddIns
    If InStr(LCase$(MyAddin.name), "mytemplate.dot") > 0 Then
    AddIns.Add MyAddin.name, Install:=True
    MyAddin.Installed = True 'belt & braces as didn't get ticked with previous line
    Exit For
    End If
    Next MyAddin

    Many thanks.
    ArchieD

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

    Re: Install Add-In using VBA (2003 SP3)

    What happens if you quit and restart Word after downloading the template?

  3. #3
    New Lounger
    Join Date
    Feb 2008
    Location
    Beckenham, United Kingdom
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Install Add-In using VBA (2003 SP3)

    Hi Hans

    Thanks for your response.

    That works because then the template is already in place in the startup path.

    Regards
    Monte

Posting Permissions

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