Monthly Archives: February 2010

Update 5.5.11: I’ve since written two more posts on handling issues with Word add-ins, the better one being: Programmatically re-enabling Word COM add-ins I’d recommend checking it out, too, as I’ve learned quite a bit since writing this post.

Many of the problems with Word 2007’s stability are due to third-party add-ins that are often used to add functionality to Word and to add new tabs and groups to the ribbon. If something unexpected happens in Word (it crashes, for example) while an add-in is being used, Word will flag it as problematic and will alert you to this the next time Word is launched. Depending on the severity of the problem, the add-in can be either ‘soft-disabled’ or ‘hard-disabled’. More on this a bit later.

In this post, I’ll explain how to programmatically restore add-ins after Word has disabled them. Determining what caused the problem in the first place is outside the scope of this post. However, I’ve watched Word fail to properly start up and blame this on an add-in that has worked without issue for weeks on end. What’s more, after re-loading the add-in, Word and the add-in will work fine for weeks more. So, it may not be a particular add-in is malfunctioning, but that Word’s handling of add-ins generally is flaky.

Microsoft explains the differences between Hard Disabled vs Soft Disabled in a MSDN article at: http://msdn.microsoft.com/en-us/library/ms268871(VS.80).aspx, but I’ll paraphrase here.

Hard-Disabled Add-ins

Hard-disabling occurs when the add-in causes the application (Word) to close unexpectedly. The problem was so serious that Word crashed.

Once an add-in has been ‘hard-disabled’ by Word 2007, it will appear in the Disabled Application Add-ins list. To see which add-ins have been hard-disabled, click on the Office Button | Word Options | Add-Ins, and scroll down to “Disabled Application Add-ins”.

To manually restore a hard-disabled add-in, first enable the add-in by selecting “Disabled Items” in the Manage menu, clicking Go, selecting the add-in to re-enable, and clicking the Enable button. Then load it by selecting “COM Add-Ins” in the Manage menu, clicking Go, and placing a check in the box next to the Add-In.

Each hard-disable add-in will have an entry in the DisabledItems registry key at:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Resiliency\DisabledItems

The entry name is some sort of hash/random binary value, rather than the name of the add-in. You can look at the hex of each and identify the specific add-in, but programatically re-enabling them is most easily done by deleting the entire Resiliency key. This makes it an ‘all or nothing’ situation.

Disabling adds a binary value for each addin with a name that’s randomly generated. The Resiliency key exists if there is at least one disabled item, but if you re-enable the addin then the Resiliency key and DisabledItems subkey are both deleted. So the presence of the Resiliency key serves as a general test for the existence of disabled items. You can re-enable the addin by deleting the specific binary reg value, or by removing the whole key.
http://help.lockergnome.com/office/Outlook-constantly-disabled–ftopict876175.html

Soft-Disabled Add-ins

Soft-disabling occurs when an add-in throws an unhandled exception, but the application (Word) does not unexpectedly close.

If an add-in has been ‘soft-disabled’ by Word 2007, it will NOT appear in the Disabled Application Add-ins list. It can be enabled by selecting “COM Add-Ins” in the Manage menu, clicking Go, and placing a check in the box next to the Add-In.

When you re-enable a soft-disabled add-in, Word immediately attempts to load the add-in. If the problem that initially caused Word to soft-disable the add-in has not been fixed, it will soft-disable the add-in again, and the box will not stay checked.

When an add-in has been soft-disabled, the LoadBehavior value in the registry will be changed. It seems that this value can exist in either of two locations:

HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins\

A LoadBehavior of 2 = unloaded (this corresponds to an unchecked box)
A LoadBehavior of 3 = loaded (this corresponds to a checked box)

Here’s more information from Microsoft on the various LoadBehavior registry entries.

Restoring disabled add-ins programmatically

Hard-disabled add-ins can be promoted to a temporarily soft-disabled status by running the following registry merge file to delete the Resiliency key:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Resiliency]

As an example, Word can be configured to attempt to load the Acrobat PDFMaker Office COM Addin installed with Acrobat 8 Standard by running the following registry merge file to force the data on the LoadBehavior value:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins\PDFMaker.OfficeAddin]
"LoadBehavior"=dword:00000003

By enabling the add-ins you wish to always load through the Word GUI, then exporting the Word\Addins registry keys to capture the correct LoadBehavior, and combining those keys with the instruction to delete the Resiliency key, you’ll be able to fix all of your add-in problems and restore Word to a working state with a single click.

A macro to display a message box with all currently loaded COM add-ins

You can use the following macro to display a message box with all currently loaded COM add-ins.

Sub ShowAddins()
'
' ShowAddins Macro
' Display a message box with all currently loaded COM add-ins
'
   Dim MyAddin As COMAddIn
   Dim i As Integer, msg As String

   For Each MyAddin In Application.COMAddIns
      msg = msg & MyAddin.Description & " - " & MyAddin.ProgID & vbCrLf
   Next

   MsgBox msg

End Sub

Source: Some COM add-ins are not listed in the COM Add-Ins dialog box in Word

Forcing add-ins to be disabled by Word

To test, you may be able to cause add-ins to be disabled by forcibly ending the winword.exe process while Word is loading, or after it has invoked a function from the add-in. It might require crashing Word a few times, but eventually you’ll get an error:

Microsoft Office Word
Word experienced a serious problem with the ‘[add-in name]’ add-in. If you have seen this message multiple times, you should disable this add-in and check to see if an update is available.
Do you want to disable this add-in?
[Yes] [No]

If you click Yes, the add-in will be hard-disabled and an entry will be created in

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Resiliency\DisabledItems

I’ve been collecting links to good WordPress templates for a long time. Because I’ve been asked a few times recently if I can recommend some templates, I’m putting them together here.

Huge, isolated, animated slideshow

I really like these themes for focusing almost exclusively on one’s portfolio. They feature a massive, animated slideshow that keeps the visitor’s attention on the images. In some cases, a shadow underneath the slideshow, combined with the animation, creates a 3-D effect to put the portfolio right in the visitor’s face.

Confined slideshow

These themes are a bit more modest than the first collection. They still accentuate a portfolio of images, but in a less flashy way. The slideshow exists within a defined banner area, so the look is a little more traditional. These templates would be a better fit for businesses.

Partial-banner image rotation

These themes use only part of the banner to display a rotating group of images, leaving an area for text next to the images. This allows a short message or tagline to get equal placement. These are the most conservative themes.

Creative themes

This last group of themes break with the conventions of the above themes and use full-screen-width or otherwise larger-than-normal images that rotate behind the other elements of the site. Undeniably attention-grabbing, but also slower to load.

Single page

These are single-page web sites. These types of pages are great as business cards or resumes, or as place holders while a larger site is developed.

The rest

I like these, too, but they don’t fit in any of the above categories.

I was handed what appeared to be a truly bricked iPod touch 2G the other day. The screen remained blank and the device would not power on with any combination of buttons. Most of the troubleshooting steps I could find online assumed that the device was able to display something – a low battery or an Apple logo. The general consensus was that most iPods displaying some sort of boot problem could be fixed by holding down the Sleep/Wake key and the Home button, as described on the iPod touch: Basic Troubleshooting page. I tried all of the recommended steps, but still the device did nothing – it showed zero signs of life. I couldn’t be sure it was charging while connected to my computer, or that the battery was still good. The one positive thing was that the headphone-jack Liquid Contact Indicator was not activated, although I couldn’t rule out some sort of physical damage.

Connecting it to a Windows computer caused a “USB Device Not Recognized” balloon to pop up. A look in Device Manager (devmgmt.msc) showed an “Unknown Device” in the Universal Serial Bus controllers.

While it was connected to the computer, I was able to invoke the “USB Device Not Recognized” balloon by holding the Sleep and Home buttons down for a few seconds, which didn’t give me much cause for hope, other than those buttons seemed to be working. This is as much life as the device exhibited.

Holding down the Sleep/Wake and/or Home buttons and then connecting the USB cable did nothing new.

I read somewhere that the “Apple Mobile Device Service” needs to be running for the connection to be established, so I opened the Services snap-in (services.msc) and started the “Apple Mobile Device Service”. I reconnected the device, but no joy.

More reading turned up that the iPod should show up in Device Manager as “Apple Mobile Device USB Driver” in the Universal Serial Bus controllers, so I also manually updated the Unknown Device to use the Apple Mobile Device USB driver, following the instructions at iPhone or iPod is not recognized properly by computer when USB drivers are not installed properly or are out of date.

This was only partially successful, as the Unknown Device was now labeled Apple Mobile Device USB Driver, but with an exclamation point next to it, indicating that the device was not functioning. The driver wasn’t able to fully install because “the device failed to start”. As a side note, there are a few other interesting possible drivers that can be selected, and I tried them all, but none of them installed successfully.

Things were looking pretty bleak. But I had fixed a USB drive that was unusable, unformattable, and reporting 0 bytes capacity a few months ago by running a reformat/reimage application, so I felt I had one last resort.

Turning the corner

I finally found a thread describing a situation like mine that didn’t (a) peter out unresolved, (b) conclude with a fix using steps I’d already tried, or (c) end in a product return/visit to the Apple Store. One poster claimed that the jailbreak software redsn0w was able to restore the iPod even when Windows wouldn’t recognize it. I was already headed down the jailbreak route, and was considering Pwnage.

While I was downloading the 3.1.2 firmware, I started scanning the instructions at http://www.iphonedownloadblog.com/2009/06/20/tutorial-iphone-30-unlock-redsn0w/

One of the steps was to connect the iPod while it was turned off (which I couldn’t be sure of). Then hold down the Sleep/Wake button for 2 seconds. Without releasing the Sleep/Wake button, also hold down the Home button for 10 seconds. Then, without releasing the Home button, release the Sleep/Wake button but keep holding the Home button for 30 seconds.

Without much hope, I just jumped ahead and followed those instructions. For some reason, by the time I had counted to 10, Windows had detected a USB device, but this time it successfully installed the Apple Mobile Device USB Driver. I held down the Home button for about 40 seconds and then released it, but nothing else happened.

Another look in Device Manager (devmgmt.msc) showed an “Apple Mobile Device USB Driver” in the Universal Serial Bus controllers, but this time without an exclamation point. This was progress.

As the firmware was still downloading, I walked away for about 30 minutes, and when I came back, an iTunes window had popped up (though I can’t remember if iTunes was already running at the time):

iTunes
iTunes has detected an iPod in recovery mode. You must restore this iPod before it can be used with iTunes.
[OK]

Bingo! iTunes was now displaying ‘iPod’ under Devices on the left side. In the Summary tab, it showed an iPod touch with Capacity: n/a, Software Version: n/a, and Serial Number: n/a. Under Version, it read:

Your iPod software is up to date. iTunes will automatically check for an update again on 2/19/2010.
If you are experiencing problems with your iPod, you can restore its original settings by clicking Restore.

So I did.

I agreed to all of the legalese and the software update began. About 20 minutes later, the iPod’s screen lit up and an iPod window opened on the computer, which read “Preparing iPod for restore…”. The iPod then displayed the Apple logo. A few more device driver balloons appeared.

A few minutes later, and I was left with a fully functional and factory-default iPod touch 2G.

Epilogue

With new-found confidence in my ability to resurrect an apparently hopelessly broken iPod, I checked eBay for other likely candidates, but found that most of the broken iPods for sale have had their liquid submersion indicators tripped. Even these have a number of bids, and the ones that seem to be in better condition aren’t that much cheaper than working ones.