Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Location
    Cleveland, Ohio
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Code to Detect Disabled Items (VBA/Word 2003/SP2)

    <font face="Comic Sans MS">Using VBA, is there a way to detect if a startup template has been disabled by Word ? We have a bunch of startup templates and if a few of them become disabled, the user may not realize it. This could cause a slew of other problems. Any ideas? </font face=comic>
    finalword

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

    Re: Code to Detect Disabled Items (VBA/Word 2003/SP2)

    I don't know if the Installed property of an add-in (global template) tells you what you want?

    Sub TestAddIns()
    Dim itm As AddIn
    For Each itm In AddIns
    If itm.Installed = False Then
    ' your code here
    End If
    Next itm
    End Sub

  3. #3
    Star Lounger
    Join Date
    Sep 2002
    Location
    Cleveland, Ohio
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code to Detect Disabled Items (VBA/Word 2003/SP2)

    <font face="Comic Sans MS">I had the same idea! Unfortunately, checking for which Templates and Addins are installed doesn't help. I tested it. As soon as one of my Startup templates becomes disabled, the VBA "Auto" Macros in the other startup templates stop working. You can even open VBA and hit Run. It simply stops working.

    I'm wondering if I need to create some sort of COM addin for this detection, but I don't know if that will work either. I also have no idea of how to write a COM addin.

    Thanks for responding, Hans! I really appreciate it!

    Any other ideas? </font face=comic>
    finalword

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

    Re: Code to Detect Disabled Items (VBA/Word 2003/SP2)

    Your description makes me think that it may not be possible to detect disabled add-ins using VBA. Why do they become disabled, by the way?

    I can't help you with COM add-ins, sorry.

  5. #5
    Star Lounger
    Join Date
    Sep 2002
    Location
    Cleveland, Ohio
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code to Detect Disabled Items (VBA/Word 2003/SP2)

    <font face="Comic Sans MS">There is one Startup template in particular that we are trying to determine why it is becoming disabled. This template contains code that searches to see if the user is on our network or not so that it can provide the appropriate toolbar. This can sometimes take a bit of time. We think our users are becoming impatient and Ending Task on Word, which disables the template, but we are not 100% positive. </font face=comic>
    finalword

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

    Re: Code to Detect Disabled Items (VBA/Word 2003/SP2)

    According to Word MVP Jay Freedman you can't detect disabled items using VBA - see Word Disabled Items.

  7. #7
    Star Lounger
    Join Date
    Sep 2002
    Location
    Cleveland, Ohio
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code to Detect Disabled Items (VBA/Word 2003/SP2)

    <font face="Comic Sans MS">Thanks for the confirmation, Hans. At least now I have something to show my boss.</font face=comic>
    finalword

Posting Permissions

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