Tag Archives: Office

During the development of our Windows 7 image with Office 2010, we began seeing a problem around our users’ Outlook 2010 profiles on the pre-production builds. On occasion, after logging into a machine for the first time, our users would be prompted to choose an Outlook profile upon the first launch of Outlook. Every time the Choose Profile dialog box was presented, it had only a single option in the profile name menu, and that option was always “BACKUP OF Outlook”, where Outlook was our customized profile as configured in a .PRF and applied via the Office OCT.

Background

We were not using .PST files and we were not using Windows Roaming Profiles, but we were using Group Policy logon and logoff scripts to roam certain portions of our user profiles, including the entire registry key at [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles]. With 20/20 hindsight, it’s clear that this unwanted behavior was not happening when we logged into a machine for the first time as a brand-new user (ie, while also preventing the logon script from merging the Profiles key from another machine into HKCU before Outlook was opened), but before a pattern had emerged, we considered the problem to be intermittent.

We were building machines using System Center 2012 Configuration Manager and using the Microsoft Office Customization Tool for configuring our .MSP and .PRF files. We were familiar with Active Setup and recognized that Outlook was doing a similar first-run process to set up a profile for what it thought was a new user. When it discovered that an Outlook profile already existed, it created a new profile named “BACKUP OF Outlook” and offered the user a Choose Profile dialog box with this profile as the only choice, presumably because “BACKUP OF Outlook” was not yet set to be the default profile.

Observed symptoms

When the logon script had roamed a user profile from another machine by importing the Profiles key, and before Outlook was launched for the first time, our Profiles key looked similar to this (the snippet has had the juicy bits removed):

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles]
"DefaultProfile"="Outlook"

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook]

After Outlook had been launched and the Choose Profile dialog box had been presented, the registry looked similar to this:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\DeletedProfiles]

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\DeletedProfiles\Outlook]

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles]

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook]

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\BACKUP OF Outlook]

The changes we noted were that a new profile named BACKUP OF Outlook had been created, a new DeletedProfiles key had been created, our desired profile had been flagged for deletion via a subkey under DeletedProfiles, and the DefaultProfile string value under the Profiles key that had been pointing to our profile had been deleted.

If we launched Outlook but cancelled out of the Choose Profile dialog box, closed Outlook, and put the Profiles key back to the state before Outlook was launched, we could then relaunch Outlook without issue. It had no objection to using the roamed profile on the second launch or any subsequent launches. The problem might arise if this user roamed the Profile key to yet another machine, but we had not yet identified a pattern or means of reproducing the problem.

Complicating factors

This was happening during a time of rapid development, when the Office OCT was being changed frequently, and machines were hitting the floor with different Office builds. The users logging into these machines were not always aware of all of the changes between builds, and in many cases we were not roaming the user’s profile in an attempt to get a ‘clean’ test of the new build. These factors contributed to the difficulty in establishing a pattern or recognizing commonalities.

A decent amount of time was spent researching problems with Outlook profiles in general, and this research turned up a few forum threads (http://social.technet.microsoft.com/Forums/en-US/outlook/thread/f05c057b-d226-4b7f-bf0d-0406db5acdb1/) that indicated the problem stemmed from the .PRF file. (We also found some mentions of an “undocumented” property named BackupProfile in the .PRF: http://www.slipstick.com/outlook/tips-for-using-outlook-prf-files-to-configure-profiles/ and http://www.slipstick.com/outlook/config/understanding-microsoft-outlook-profile-file-prf/.) We experimented briefly with making changes to the .PRF as hinted at in these threads, but felt that such trial-and-error experimentation was not the best use of our time.

The epiphany

A tip passed along by one of our Kraft Kennedy consultants lead to the break-through.

When 32-bit Office is installed with an .MSP generated by the OCT, a GUID-named key is created under [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\User Settings] that contains a value named Count with a data of 1. For example:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\User Settings\{75BB133B-F5DD-423C-8321-3BD0B50322A5}]
"Count"="1"

Much like Active Setup, when Outlook launches, it looks for a corresponding key in [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\User Settings], also with a
value named Count with a data of 1. If the matching key is not found, Outlook does its first-run process, applies the .PRF, and then writes the GUID-named key to HKCU so that the first-run behavior doesn’t happen on that machine again.

In our case, each time we made a change to the OCT and cooked up a new OSD image in SCCM, the GUID-named key under HKLM changed. When a user from an old machine roamed to one of these new machines (or when a user initially on a new machine roamed to an older one), the GUID-named keys did not match and the first-run behavior fired off.

The resolution

Now that we better understood what was happening, we could evaluate a few ways to handle the situation. One way was to detect whether the user already had a default profile, and then add the current machine’s HKLM GUID key to her HKCU. Another way was to try to get a better handle on the .PRF and configure it to not create the backup, even when the first-run behavior was triggered. The latter seemed preferable, because we weren’t sure that avoiding the first-run behavior entirely was desirable. We suspected that there might be an advantage to allowing Office’s first-run process to play out, for example, if future changes to the OCT were made that needed to be added to the user’s environment.

After some communication with Microsoft, we made two changes to our .PRF that suppressed the creation of the BACKUP OF profile. The first change was to add BackupProfile=False to the Section 1, General area. The second change was to use UniqueService=Yes in the Section 4, Service1 area.

The corrected .PRF, in part, looks like this:

;Automatically generated PRF file from the Microsoft Office Customization and Installation Wizard

; **************************************************************
; Section 1 - Profile Defaults
; **************************************************************

[General]
Custom=1
ProfileName=Outlook
DefaultProfile=Yes
OverwriteProfile=Yes
ModifyDefaultProfileIfPresent=False
BackupProfile=False

...

;***************************************************************
; Section 4 - Default values for each service.
;***************************************************************

[Service1]
OverwriteExistingService=No
UniqueService=Yes
MailboxName=%UserName%

Some final thoughts

I would note that we are using BackupProfile=False, while many of the forum threads on the subject (incorrectly?) reference the property value as No, as in BackupProfile=No.

This “undocumented” BackupProfile property is actually quite well-documented, and even highlighted as important, in the TechNet article at http://technet.microsoft.com/en-us/library/cc179062.aspx.

A TechNet blog post from August, 2010, at http://blogs.technet.com/b/odsupport/archive/2010/08/06/multiple-exchange-accounts-created-in-outlook-2010-with-existing-outlook-profiles-after-upgrading-from-an-earlier-office-version-using-a-custom-msp.aspx is dedicated to a problem with multiple Exchange accounts that is resolved by making the same two changes to the .PRF. The blog post helpfully points out that the manually edited .PRF file must exist in the same location as the .PRF originally used with the OCT:

NOTE: If Outlook/Exchange settings in the MSP file need to be edited in the future, the custom PRF file created to work around this issue must be copied to the same location as it was when originally imported into the OCT (i.e., C:\Custom14.PRF) on the machine that you’re running the Office Customization Tool on when modifying the MSP file.
http://blogs.technet.com/b/odsupport/archive/2010/08/06/multiple-exchange-accounts-created-in-outlook-2010-with-existing-outlook-profiles-after-upgrading-from-an-earlier-office-version-using-a-custom-msp.aspx

The work yet to be done

Without further testing, it remains unclear whether the BackupProfile=False instruction, possibly in combination with other options in the .PRF, causes settings in the .PRF to be merged into the existing Outlook profile, or whether the presence of an existing profile means Outlook just doesn’t do anything with the .PRF.

Customize Outlook profiles by using an Outlook Profile (PRF) file
An existing profile can be either overwritten or updated when a new .prf file is executed. Several settings control how the new settings are applied:

The OverwriteProfile setting can be set to Yes, Append, or No. To update existing profiles, set the value to Append. This preserves the existing profile and updates the sections that have been changed. To overwrite existing profiles with a new profile, set the value to Yes. To prevent overwriting an existing profile, set the value to No.

The ModifyDefaultProfileIfPresent setting can be set to True or False. When set to True, Outlook will modify the default profile even if the new and existing profile names are different.
http://technet.microsoft.com/en-us/library/cc179062.aspx

I would also like to better understand how the GUID-named key gets its name. The TechNet article on the Office Customization Tool in Office 2010 seems to possibly allude to the GUID being a timestamp.

Every time that you save a customization file in the OCT, the tool updates the customization file’s sequencing number with the current computer date and time stamp and generates a new update globally unique identifier (GUID).
http://technet.microsoft.com/en-us/library/cc179097.aspx

As it seems to be the subject of some debate, I want to point out that Microsoft supports applying Setup customization .msp files to existing installations of Office 2010. I suspect, but have not attempted to confirm, that this would generate additional GUID-named keys.

I’m in the middle of troubleshooting a printing problem that has arisen with our in-development Windows 7 image. We’re running 64-bit Windows 7 Enterprise with Office 2010 and using the HP Universal Print Driver for Windows PCL6 version 5.4.0 dated 1 Dec 2011 (the current version). The printer driver is installed on a Windows server using default settings and the printer connections on the workstations are created either as per-machine connections by running printui.exe /ga or as per-user connections by running the Find Printers wizard in an Office application. The printers themselves are HP 4250n and HP P4015 models with relatively up-to-date firmware.

The problem is that certain print jobs produce many pages of apparent gibberish instead of the intended file or email message. The gibberish pages begin like this:

"
 @PJL SET JOBATTR="JobAcct8=USERNAME"
                                     @PJL SET JOBATTR="JobAcct9="
                                                                 @PJL SET RET=OFF

I’ve done some research into the lines beginning @PJL, and my understanding is that PJL (Printer Job Language) commands are part of the standard job header output from the Universal Printer Driver, and that when everything is working normally, they are processed by the printer as instructions instead of printed as text.

For more reading about PJL commands, I can recommend the page at: http://www.sxlist.com/techref/language/pcl/lj1686.htm

Almost immediately, I was able to rule out the per-machine connections as being the cause, as the problem also occurred on per-user connections. The same files that printed problematically to the networked HP printers printed normally to locally-installed printers using non-UPD PCL 6 drivers. It seemed logical to pursue this as a driver-related problem.

What is PCL 6

It’s probably worth pausing here for a bit of explanation of PCL 6.

The Enhanced PCL XL or PCL6 driver that is included with the HP LaserJet printers provides enhanced WYSIWYG and enhanced performance with application support over the Standard (PCL5e) driver. PCL XL is a new page description language by HP that is part of PCL6 and is closer to GDI, which many applications use. Less translation takes place by the driver, which means increased WYSIWYG capabilities and better performance with applications that support escapes implemented by the Enhanced driver. The output from the Enhanced (PCL XL) driver may not be the same as the output from the Standard driver. If the output is not as expected, choose the Standard (PCL5e) driver instead.
What is the Enhanced PCL XL or PCL6 Driver?

The part that catches my eye is “better performance with applications that support escapes implemented by the Enhanced driver”. Are we encountering applications that do not support escapes?

Eliminating possible causes

Possible causes of the PJL commands being output as text include the driver not prefixing the PJL statements (at the beginning of each job) with a Universal Exit Language (UEL) escape sequence. (http://www.tek-tips.com/viewthread.cfm?qid=1618494)

To rule this out, one can use the “print to file” option in the print dialog box to produce a file that contains the instructions that would be sent to the printer.

Choose File | Print in your application, then check the “Print to file” box in the print dialog box. (In Office 2010, the Print Options button under the available printers menu displays the print dialog box.) Choose a name for the .prn file and save it somewhere, then open the resultant *.prn file in something that displays escape characters, such as Notepad++ (or even Notepad). The first character should be an escape character, and the first line of text will begin something like this:

{ESC}%-12345X

If the PJL initialization command looks correct, it’s possible that the printer is not properly configured to accept PJL commands. Older printers may not be PJL-aware, but I knew our printers to work fine with older 32-bit HP UPDs installed on our Windows XP machines. The ‘Personality’ attribute on HP printers can be checked by going to the printer’s web admin panel and browsing to Settings | Configure Device | System Setup. Setting the Personality to PS is probably going to cause problems, but either Auto or PCL should work. I confirmed that our printers were set to Auto, further ruling out the printers themselves as the cause of the problem.

I next looked at disabling the advanced features of the driver (a little skeptically, I’ll admit). This can be done by going into the printer’s properties and unchecking the “Enable advanced printing features” box on the Advanced tab. (http://h30499.www3.hp.com/t5/Print-Servers-Network-Storage/12345X-PJL-Printing-on-Dot-Matrix-Printers/td-p/1132391) I was curious about how this affected the job sent to the printer – would the entire series of JPL commands be removed?

To test, I unchecked the “Enable advanced printing features” and printed an email message to a *.prn file, then checked the box and printed the same email to a second *.prn file, then compared the two files. The only difference in the PJL commands was that “@PJL SET SEPARATORPAGE=OFF” was present with advanced printing features enabled, and absent with advanced printing features disabled.

I found the separator page line to be an interesting difference, as banner pages/separator pages had been suggested as a possible cause, but our drivers were not configured to print separator pages. (http://www.oasq.com/PJL-SET-JOBATTR-thread-252568-1-1.html)

So, that’s where the issue currently stands. I’m waiting to see if turning off advanced printing features has any effect. To be thorough, I need to test whether the UPD PS driver prints without error and whether the problem continues with a printer connected via TCP/IP and with a manually installed driver. I can also bring the printers up to the latest version of the firmware, although this would be a less satisfactory resolution, as we have a variety of printer models and not all of them have firmware updates available.

Update 17 Feb. 2012

The Application event log on the print server contains a number of errors, though we’re unsure of whether there is a direct correlation between the errors and attempts by Windows 7 users to print, or jobs in the spooler being processed, or any other activity.

Description:
Faulting application name: PrintIsolationHost.exe, version: 6.1.7600.16385, time stamp: 0x4a5bd3b1
Faulting module name: hpzuiwn7.dll, version: 0.3.7071.0, time stamp: 0x4a5bdfcb
Exception code: 0xc0000005
Fault offset: 0x00000000000d6971
Faulting process id: 0x900
Faulting application start time: 0x01ccea9860e17377
Faulting application path: C:\Windows\system32\PrintIsolationHost.exe
Faulting module path: C:\Windows\system32\spool\DRIVERS\x64\3\hpzuiwn7.dll
Report Id: 3eaa21e6-568c-11e1-b7a4-005056a50027

It certainly does look like the 64-bit HP driver is at fault here. More searching has turned up a number of reports of this error with HP’s UPD PCL6 driver, going back to 2010.

Because we have a small number of Windows 7 users, we’re removing the network printers from the Windows 7 machines temporarily, to see if the server stabilizes.

Update 21 Feb. 2012

We were able to take a closer look at the print server today. We searched the registry for hpzuiwn7.dll and noted the printers that had this DLL listed among the supporting files. Many, but not all, of the printers included this DLL. We also reviewed the printers in Print Management and made an odd discovery. There seemed to be two varieties of the model-specific PCL 6 driver in use: one is named “HP LaserJet 4250 PCL 6” and the other is “HP LaserJet 4250 PCL6“. The difference in the naming is that the later driver has a space between PCL 6. While most of the printers used the UPD, a handful were using one of the model-specific drivers. When we looked at the Additional Drivers, we found that one of them had only the 64-bit version available. I expect that only 32-bit workstations are printing to those printers, so I’m not sure how they even functioned, but it would seem that the next step would be to either add the matching 32-bit drivers for that model printer or change the assigned driver to UPD PCL 6. I suspect that we were not diligent enough about exactly matching the printer driver names (let alone the version numbers) when we were installing drivers on the server.

Update 1 Mar. 2012

After installing the missing 32-bit driver that complemented the stray 64-bit driver, all of the printing problems, including the error messages in the Application log on the server, have subsided.

It’s widely known that Microsoft allows anyone to install and use any version of Windows 7 for 30 days without having to enter a product activation key. By using the slmgr -rearm command, this 30-day trial period can be extended three times for a total of 120 days before the installation must be activated to continue functioning.

It is less known, perhaps, that Microsoft has implemented a similar method for delaying the activation of Office 2010 for up to 180 days. The steps below are from the Deploy volume activation of Office 2010 instructions on TechNet.

To rearm your Office 2010 installation

  1. Make sure all Office 2010 applications are closed.
  2. Open an elevated command prompt.
  3. Go to %installdir%\%Program Files%\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform. If you installed the 32-bit edition of Office 2010 on a 64-bit operating system, %Program Files% is the Program Files (x86) folder.
  4. Run ospprearm.exe.

(The italics are mine, as I was tripped up for awhile by looking for ospprearm.exe under C:\Program Files\, rather than the Program Files (x86) folder.)

The Office 2010 rearm delays the activation requirement for 30 days, and it can be used five times, for a total of 180 days of activation-free use.

Nearly a year ago, I wrote a post on how to detect and fix Word add-in problems with a macro and batch file, in a Windows XP and Office 2007 environment.

This was sufficiently effective, but it was also overly complicated, requiring four separate components:

  1. an autoexec Word 2007 macro that runs each time Word is opened
  2. a batch file that runs the registry merge file and writes an entry to a log file
  3. the registry merge file that contains the correct LoadBehavior settings for the add-ins
  4. a text file that acts as a log

This month, I decided to rewrite the macro to handle the registry changes and write to the log file. It was also a good opportunity to dig a bit deeper into VBA, and I also wanted to confirm that it would work in a more modern environment of Windows 7 and Office 2010 (that code is near the bottom of the post). The new system has only two components:

  1. an autoexec Word 2007 macro that runs each time Word is opened
  2. a text file that acts as a log

Background

First, a bit of background.

Many of the problems with Word 2007 are due to Word’s handling of add-ins. When something unexpected happens in Word, and Word attributes the problem to an add-in, Word will react by flagging it and prompting the user for a decision the next time Word opens. Depending on the severity of the problem and the user’s response, the add-in can be either ‘hard-disabled’ or ‘soft-disabled’.

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.

I’ve explained a bit about the process by which Word disables add-ins at the end of this post, and I’ve written a shorter post about the basics behind the registry keys responsible for disabling add-ins.

Handling disabled add-ins programmatically

A Word macro can access the condition of an add-in via an Application.COMAddIns object, and it can read and write to the registry. This allows us to tell when an add-in has been disabled and re-enabled it.

My macro has some admittedly hackish parts that need to be cleaned up, there is the matter of unsetting variables to be addressed, and it could certainly be made more elegant, but it works. Note that a file named addinslog.txt must exist in the %TEMP% directory in order for the macro to write the log file. This is what the Word 2007 macro looks like, using the COM add-in installed with Adobe Acrobat 8 Standard as the required add-in…

Option Explicit

' Set up a function to search for a key and return true or false
Public Function KeyExists(key)
    Dim objShell
    On Error Resume Next
    Set objShell = CreateObject("WScript.Shell")
        objShell.RegRead (key)
    Set objShell = Nothing
    If Err = 0 Then KeyExists = True
End Function
    

Sub AutoExec()
'
' FixMissingAddins Macro
' Display a message box with any critical but not 'Connected' COM add-ins, then fix them programatically
'
' Oliver Baty
' June, 2010 - April, 2011
'
' Information on the Application.COMAddIns array
' http://msdn.microsoft.com/en-us/library/aa831759(v=office.10).aspx
'
' Running macros automatically
' http://support.microsoft.com/kb/286310
'
' Using Windows Scripting Shell (WshShell) to read from and write to the local registry
' http://technet.microsoft.com/en-us/library/ee156602.aspx

   
' Declare the WshShell variable (this is used to edit the registry)
    Dim WshShell
    
' Declare the fso and logFile variables (these are used to write to a txt file)
    Dim fso
    Dim logFile

' Create an instance of the WScript Shell object
    Set WshShell = CreateObject("WScript.Shell")
   
' Declare some other variables
   Dim MyAddin As COMAddIn
   Dim stringOfAddins As String
   Dim listOfDisconnectedAddins As String
   Dim requiredAddIn As Variant
   Dim msg As String

   
' Notes on deleting registry keys and values in VB
' http://www.vbforums.com/showthread.php?t=425483
' http://www.tek-tips.com/viewthread.cfm?qid=674375
' http://www.robvanderwoude.com/vbstech_registry_wshshell.php

' Create a string containing the names of all 'Connected' COM add-ins named "stringOfAddins"
   For Each MyAddin In Application.COMAddIns
      If MyAddin.Connect = True Then
          stringOfAddins = stringOfAddins & MyAddin.ProgID & " - "
      End If
   Next
   
' Create an array to hold the names of the critical (required) add-ins named "requiredAddIns"
' Example: change to "Dim requiredAddIns(0 To 4)" if the macro is checking 5 total add-ins)
   Dim requiredAddIns(0 To 0) As String
   
' Add each required AddIn to the array
   requiredAddIns(0) = "PDFMaker.OfficeAddin"
'   requiredAddIns(1) = ""
'   requiredAddIns(2) = ""
'   requiredAddIns(3) = ""
'   requiredAddIns(4) = ""
   
' Cycle through the array of required add-ins, and see if they exist in the connected add-ins list
   For Each requiredAddIn In requiredAddIns
      If InStr(stringOfAddins, requiredAddIn) Then
        ' The required add-in is in the string of connected add-ins
         msg = msg
      Else
        ' The required add-in is not in the string of connected add-ins, so add the add-in name to a string named "listOfDisconnectedAddins"
         msg = msg & requiredAddIn & vbCrLf
         listOfDisconnectedAddins = requiredAddIn & " " & listOfDisconnectedAddins
         listOfDisconnectedAddins = Trim(listOfDisconnectedAddins)
      End If
   Next
   
' If the msg variable is not blank (it contains at least one add-in's name) handle it, otherwise, do nothing
   If msg = "" Then
        ' There are no critical, unconnected add-ins (yay!)
        ' The script can now exit
   Else
        ' There are critical add-ins that are not connected, so handle this
        MsgBox "The following critical Word Add-In(s) are disabled: " & vbCrLf & vbCrLf & msg & vbCrLf & vbCrLf & "To correct this problem, please save any documents you are working on, then close Word and reopen Word."

            ' I find it extremely hackish to check for each possible key and delete it if found... need to research how to delete the tree
            ' One potential obstacle to this method is that I've seen a DocumentRecovery subkey under Resiliency (only once, while editing this macro), that I haven't researched yet
            
            
            ' Note: Since the WSH Shell has no Enumeration functionality, you cannot
            '       use the WSH Shell object to delete an entire "tree" unless you
            '       know the exact name of every subkey.
            '       If you don't, use the WMI StdRegProv instead.
            ' http://www.robvanderwoude.com/vbstech_registry_wshshell.php

            ' More info on WMI StdRegProv at:
            ' http://msdn.microsoft.com/en-us/library/aa393664(v=vs.85).aspx
            
        ' This is hackish, but it effectively deletes a registry key, if it exists
        If KeyExists("HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Resiliency\DisabledItems\") Then
            WshShell.RegDelete "HKCU\Software\Microsoft\Office\12.0\Word\Resiliency\DisabledItems\"
        ElseIf KeyExists("HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Resiliency\StartupItems\") Then
            WshShell.RegDelete "HKCU\Software\Microsoft\Office\12.0\Word\Resiliency\StartupItems\"
        ElseIf KeyExists("HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Resiliency\") Then
            WshShell.RegDelete "HKCU\Software\Microsoft\Office\12.0\Word\Resiliency\"
        End If
        
        ' To be completely thorough, we can also set the desired LoadBehavior for certain add-ins
        ' This can be done selectively, and only if the LoadBehavior was incorrect, but the quick and dirty way would be to just force the values
        
        WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Office\Word\Addins\PDFMaker.OfficeAddin\LoadBehavior", 3, "REG_DWORD"

        ' Release the WshShell object
        Set WshShell = Nothing
        
        ' Declare a few variables for the log file
        Dim user, machine, datetime, output
        
        Set WshShell = CreateObject("WScript.Shell")
        user = WshShell.ExpandEnvironmentStrings("%USERNAME%")
        machine = WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
        temp = WshShell.ExpandEnvironmentStrings("%TEMP%")
        ' Convert the slashes in Now to hyphens to prevent a fatal error
        datetime = Replace(Now, "/", "-")
        ' Create the string that will be written to the log file
        output = datetime + ", " + user + ", " + machine + ", " + listOfDisconnectedAddins

        ' Write the event to a log file
        logfile = temp + "\addinslog.txt"
        ' http://msdn.microsoft.com/en-us/library/2z9ffy99(v=vs.85).aspx
        ' http://www.devguru.com/technologies/vbscript/quickref/filesystemobject_opentextfile.html
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set logFile = fso.OpenTextFile(logfile, 8, True)
        logFile.WriteLine (output)
        logFile.Close
        Set logFile = Nothing
        Set fso = Nothing
        
        ' Should we clear the variables?
        
        ' Release the WshShell object
        Set WshShell = Nothing
   End If
   
   ' Ardamis.com - We're in your macros, fixing your COM add-ins.
End Sub

While working on this, I found that there were some gaps in my understanding of the sequence of events that occur when Word 2007 disables a COM add-in. Please comment if you find that any of this is inaccurate or incomplete.

What happens when Word launches

A critical key to the whole business of Word add-ins is HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Resiliency

When Word launches, it looks for data under the Resiliency key and a subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Resiliency\StartupItems

If the StartupItems subkey contains a REG_BINARY value that corresponds to an add-in, Word throws the familiar warning:

Microsoft Office Word
Word experienced a serious problem with the ‘[addin 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]

Choosing No at the prompt removes the Resiliency key and allows Word to continue to launch, leaving the LoadBehavior for that add-in unchanged.

Choosing No also writes an Error event to the Application Event Viewer log:

Event Type:	Error
Event Source:	Microsoft Office 12
Event Category:	None
Event ID:	2000
Date:		5/23/2011
Time:		3:15:29 PM
User:		N/A
Computer:	[WORKSTATION_NAME]
Description:
Accepted Safe Mode action : Microsoft Office Word.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Choosing Yes at the prompt removes the StartupItems subkey and creates a new DisabledItems subkey. This DisabledItems subkey will contain a different REG_BINARY value, the data of which contains information about the disabled add-in.

Choosing Yes also writes an Error event to the Application Event Viewer log:

Event Type:	Error
Event Source:	Microsoft Office 12
Event Category:	None
Event ID:	2001
Date:		5/23/2011
Time:		3:12:36 PM
User:		N/A
Computer:	[WORKSTATION_NAME]
Description:
Rejected Safe Mode action : Microsoft Office Word.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

At this point, the add-in is ‘hard-disabled’, but not ‘soft-disabled’.

Word then continues to launch, but without loading the add-in.

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 see which add-ins have been soft-disabled, click on the Office Button | Word Options | Add-Ins. Select “COM Add-Ins” in the Manage menu and click Go.

Word is somewhat tricky in this regard, as the add-in will not have a checkmark, but the LoadBehavior registry value will be unchanged. At any other time, the presence of a checkmark is an indication of the LoadBehavior, but when an add-in has been hard-disabled, the box will always be unchecked.

What users can do at this point

Going through Word Options and enabling the hard-disabled COM add-in will remove the Resiliency key. This may not make the add-in immediately available in Word, however.

To immediately load the add-in and gain its functionality, you can check the box. Otherwise, close and reopen Word, which will cause Word to launch with the add-in’s specified LoadBehavior.

In case you were curious about the keyboard shortcuts used to enable the first disabled add-in in the list of disabled add-ins (maybe you wanted to do something with SendKeys, for example), they are:
Alt+F, I, A, A, Tab, Tab, Tab, D, Enter, G, Space, Alt+E, C, Alt+F4.

In summary, deleting the Resiliency key after the “serious problem” prompt, then closing and reopening Word, returns Word to a normal operating state.

What I intend to accomplish with the macro is to re-enable the hard-disabled add-in, return any LoadBehavior values back to the desired settings, then prompt the user to save their work and close and reopen Word.

This should return Word to a working state.

Word 2010 on 64-bit Windows 7

As a bonus, here’s the same macro, with some minor adjustments to run in Word 2010 on Windows 7 64-bit, with Adobe Acrobat 9 Pro’s COM add-in acting as one of the required add-ins. The OneNote add-in is not enabled in Word by default, and the macro below does not attempt to enable it, but does consider it a required add-in. This is done to demonstrate the pop-up window. Note that a file named addinslog.txt must exist in the %TEMP% directory in order for the macro to write the log file.

Option Explicit

' Set up a function to search for a key and return true or false
Public Function KeyExists(key)
    Dim objShell
    On Error Resume Next
    Set objShell = CreateObject("WScript.Shell")
        objShell.RegRead (key)
    Set objShell = Nothing
    If Err = 0 Then KeyExists = True
End Function

Sub AutoExec()
'
' FixMissingAddins Macro
' Display a message box with any critical but not 'Connected' COM add-ins, then fix them programatically
'
' Oliver Baty
' June, 2010 - April, 2011
'
' Information on the Application.COMAddIns array
' http://msdn.microsoft.com/en-us/library/aa831759(v=office.10).aspx
'
' Running macros automatically
' http://support.microsoft.com/kb/286310
'
' Using Windows Scripting Shell (WshShell) to read from and write to the local registry
' http://technet.microsoft.com/en-us/library/ee156602.aspx

' Declare the WshShell variable (this is used to edit the registry)
    Dim WshShell

' Declare the fso and logFile variables (these are used to write to a txt file)
    Dim fso
    Dim logfile

' Create an instance of the WScript Shell object
    Set WshShell = CreateObject("WScript.Shell")

' Declare some other variables
   Dim MyAddin As COMAddIn
   Dim stringOfAddins As String
   Dim listOfDisconnectedAddins As String
   Dim requiredAddIn As Variant
   Dim msg As String

' Notes on deleting registry keys and values in VB
' http://www.vbforums.com/showthread.php?t=425483
' http://www.tek-tips.com/viewthread.cfm?qid=674375
' http://www.robvanderwoude.com/vbstech_registry_wshshell.php

' Create a string containing the names of all 'Connected' COM add-ins named "stringOfAddins"
   For Each MyAddin In Application.COMAddIns
      If MyAddin.Connect = True Then
          stringOfAddins = stringOfAddins & MyAddin.ProgID & " - "
      End If
   Next

' Create an array to hold the names of the critical (required) add-ins named "requiredAddIns"
' Example: change to "Dim requiredAddIns(0 To 4)" if the macro is checking 5 total add-ins)
   Dim requiredAddIns(0 To 1) As String

' Add each required AddIn to the array
   requiredAddIns(0) = "PDFMaker.OfficeAddin"
   requiredAddIns(1) = "OneNote.WordAddinTakeNotesService"
'   requiredAddIns(2) = ""
'   requiredAddIns(3) = ""
'   requiredAddIns(4) = ""

' Cycle through the array of required add-ins, and see if they exist in the connected add-ins list
   For Each requiredAddIn In requiredAddIns
      If InStr(stringOfAddins, requiredAddIn) Then
        ' The required add-in is in the string of connected add-ins
         msg = msg
      Else
        ' The required add-in is not in the string of connected add-ins, so add the add-in name to a string named "listOfDisconnectedAddins"
         msg = msg & requiredAddIn & vbCrLf
         listOfDisconnectedAddins = requiredAddIn & " " & listOfDisconnectedAddins
         listOfDisconnectedAddins = Trim(listOfDisconnectedAddins)
      End If
   Next

' If the msg variable is not blank (it contains at least one add-in's name) handle it, otherwise, do nothing
   If msg = "" Then
        ' There are no critical, unconnected add-ins (yay!)
        ' The script can now exit
   Else
        ' There are critical add-ins that are not connected, so handle this
        MsgBox "The following critical Word Add-In(s) are disabled: " & vbCrLf & vbCrLf & msg & vbCrLf & vbCrLf & "To correct this problem, please save any documents you are working on, then close Word and reopen Word."

            ' I find it extremely hackish to check for each possible key and delete it if found... need to research how to delete the tree
            ' One potential obstacle to this method is that I've seen a DocumentRecovery subkey under Resiliency (only once, while editing this macro), that I haven't researched yet

            ' Note: Since the WSH Shell has no Enumeration functionality, you cannot
            '       use the WSH Shell object to delete an entire "tree" unless you
            '       know the exact name of every subkey.
            '       If you don't, use the WMI StdRegProv instead.
            ' http://www.robvanderwoude.com/vbstech_registry_wshshell.php

            ' More info on WMI StdRegProv at:
            ' http://msdn.microsoft.com/en-us/library/aa393664(v=vs.85).aspx

        ' This is hackish, but it effectively deletes a registry key, if it exists
        If KeyExists("HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Resiliency\DisabledItems\") Then
            WshShell.RegDelete "HKCU\Software\Microsoft\Office\14.0\Word\Resiliency\DisabledItems\"
        ElseIf KeyExists("HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Resiliency\StartupItems\") Then
            WshShell.RegDelete "HKCU\Software\Microsoft\Office\14.0\Word\Resiliency\StartupItems\"
        ElseIf KeyExists("HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Resiliency\") Then
            WshShell.RegDelete "HKCU\Software\Microsoft\Office\14.0\Word\Resiliency\"
        End If

        ' To be completely thorough, we can also set the desired LoadBehavior for certain add-ins
        ' This can be done selectively, and only if the LoadBehavior was incorrect, but the quick and dirty way would be to just force the values

        WshShell.RegWrite "HKCU\Software\Microsoft\Office\Word\Addins\PDFMaker.OfficeAddin\LoadBehavior", 3, "REG_DWORD"

        ' Release the WshShell object
        Set WshShell = Nothing

        ' Declare a few variables for the log file
        Dim user, machine, temp, datetime, output

        Set WshShell = CreateObject("WScript.Shell")
        user = WshShell.ExpandEnvironmentStrings("%USERNAME%")
        machine = WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
        temp = WshShell.ExpandEnvironmentStrings("%TEMP%")
        ' Convert the slashes in Now to hyphens to prevent a fatal error
        datetime = Replace(Now, "/", "-")
        ' Create the string that will be written to the log file
        output = datetime + ", " + user + ", " + machine + ", " + listOfDisconnectedAddins

        ' Write the event to a log file
        logfile = temp + "\addinslog.txt"
        ' http://msdn.microsoft.com/en-us/library/2z9ffy99(v=vs.85).aspx
        ' http://www.devguru.com/technologies/vbscript/quickref/filesystemobject_opentextfile.html
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set logfile = fso.OpenTextFile(logfile, 8, True)
        logfile.WriteLine (output)
        logfile.Close
        Set logfile = Nothing
        Set fso = Nothing
        
        ' Should we clear the variables?

        ' Release the WshShell object
        Set WshShell = Nothing
   End If

   ' Ardamis.com - We're in your macros, fixing your COM add-ins.
End Sub

Actually, my method of toggling the read-only attribute of Word.qat requires two macros. One switches on the read-only attribute of Word.qat to prevent it from being changed. The other clears the read-only attribute so buttons can be added or removed.

Just add these macros as buttons to the QAT to quickly protect and unprotect it. I prefer two buttons to a single button because I don’t know of a way of telling, visually, the current state of the read-only attribute of a file. I’d love to change the appearance of the button to indicate the state, but I haven’t found a way to do this. So for now, two buttons allow the user to take exactly the action desired.

Why would you ever need to do this?

Buttons disappearing from the QAT is a pretty common occurrence.

If your Quick Access Toolbar contains buttons from templates or COM add-ins, these custom buttons can be lost when Word is closed and reopened. To demonstrate this, add such a button to the QAT, then close Word and reopen it from the command line with winword.exe /a (the /n switch may also demonstrate this). Word will open, but without any add-ins. Instead of creating a temporary Word.qat with the default buttons, the working Word.qat file is edited to remove all the non-native Word buttons. The appearance to the user is that Word loses the custom buttons. Once the buttons disappear, they do not return when Word is opened normally.

From what I can tell, the QAT buttons disappearing isn’t a random event or a bug, but an intentional consequence of initiating a Word instance without any add-ins or a result of a badly written function in a template or add-in.

The LockQAT Macro

Sub LockQAT()
'
' LockQAT Macro
'
'

    Dim appdata, thepath, objFSO, objFile

    Set oShell = CreateObject("WScript.Shell")
    appdata = oShell.ExpandEnvironmentStrings("%APPDATA%")
    thepath = appdata & "\Microsoft\Office\Word.qat"

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.GetFile(thepath)
    
    'Determine if the file is ALREADY Read-Only
    If objFile.Attributes And 1 Then
        MsgBox "The Word.QAT file is already Read-only."
    Else
        MsgBox "Locking the QAT from further editing."
        objFile.Attributes = objFile.Attributes + 1
    End If
    
' Resources
' http://www.4guysfromrolla.com/webtech/112600-1.shtml

End Sub

The UnlockQAT Macro

Sub UnlockQAT()
'
' UnlockQAT Macro
'
'

    Dim appdata, thepath, objFSO, objFile
    
    Set oShell = CreateObject("WScript.Shell")
    appdata = oShell.ExpandEnvironmentStrings("%APPDATA%")
    thepath = appdata & "\Microsoft\Office\Word.qat"

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.GetFile(thepath)

    'Determine if the file is ALREADY Read-Only
    If objFile.Attributes And 1 Then
        MsgBox "Unlocking the QAT for editing."
        objFile.Attributes = objFile.Attributes - 1
    Else
        MsgBox "The Word.QAT file is already writeable."
    End If

' Resources
' http://www.4guysfromrolla.com/webtech/112600-1.shtml
    
End Sub

Update 5.5.11: I’ve written a better macro that doesn’t require a separate batch file and registry merge file. Please check out the new post at:

Programmatically re-enabling Word COM add-ins

A few months ago, I wrote a post on fixing Word 2007 add-in issues with a registry merge. In this post, I’ll take that idea a little further and explain how to automatically detect and fix add-ins through the use of a macro that runs each time Word is opened and a batch file that runs the registry merge file. All the end-user needs to do to repair the missing functionality is close and reopen Word.

The idea is that, in a corporate environment, there are certain important add-ins that must be running in order for Word to work normally. A good example would be an add-in that integrates Word with a document management system. Should that integration be lost because the add-in failed to load, data may be lost. Because there is no way to force Word to load certain add-ins, and there is no built-in function in Word for warning users when critically important don’t load, I decided to come up with a method for alerting the user to the problem and then fixing it with as little inconvenience as possible.

The example code in this post assumes the workstation is running Office 2007 on Windows XP (32-bit). I would think that the method could be adapted to other environments (Windows 7, Office 2010) without too much trouble. I’ve tried to note where differences come up on Windows 7 and 64-bit operating systems.

The process has four components:

  • an autoexec Word 2007 macro that runs each time Word is opened
  • a batch file that runs the registry merge file and writes an entry to a log file
  • the registry merge file that contains the correct LoadBehavior settings for the add-ins
  • a text file that acts as a log

The macro can be added to Normal.dotm or saved to a new .dotm file placed in the startup directory. The .bat batch file, .reg registry file, and .txt log file can be put anywhere, but in this example, they will be saved to a new folder C:\Word Add-ins fix\.

In the code examples below, I’ll be using the Acrobat PDFMaker Office COM Addin as the add-in that must always be loaded. This plugin is installed with Acrobat versions 8.1 and above and adds an Acrobat tab to the ribbon.

The macro

The first thing to do is to collect some information on the COM add-ins that are currently installed. Microsoft Support provides a simple macro for listing all of the COM add-ins at Some COM add-ins are not listed in the COM Add-Ins dialog box in Word. I recommend using this macro to identify the ProgID of your add-ins. The text to the left of the hyphen is the add-in’s Description and the text to the right of the hyphen is the ProgID.

Running the macro from the Microsoft site shows us that the ProgID for the Acrobat PDFMaker Office COM Addin is PDFMaker.OfficeAddin.

In Microsoft jargon, an add-in with a LoadBehavior of 3 is ‘Connected’. The COMAddIn object has a property called Connect that will be True if the add-in is Connected and False if it is not. The macro first checks the Connect property of each add-in and writes the ProgID of each Connected add-in to a string. It then checks to see if the string contains a match for each of the required add-ins. If the required add-in does not exist in the string, the macro will display a message to the user and fire the batch file to reset the LoadBehavior. It also passes the names of any not connected add-ins to the batch file as a parameter, so that information can be logged.

I found this article from MSDN on the COMAddIn object very helpful.

Sub AutoExec()
'
' FindMissingAddins Macro
' Display a message box with any critical but not 'Connected' COM add-ins
'

   Dim msg As String
   
   Dim MyAddin As COMAddIn
   Dim i As Integer, stringOfAddins As String
   
   For Each MyAddin In Application.COMAddIns
      If MyAddin.Connect = True Then
          stringOfAddins = stringOfAddins & MyAddin.ProgID & " - "
      End If
   Next
   
' Update the number of elements in the array
' Example: change to "requiredAddIns(0 To 4)" if you were checking 5 total add-ins)
   Dim requiredAddIns(0 To 0) As String
   
' Add each required AddIn to the array
   requiredAddIns(0) = "PDFMaker.OfficeAddin"
'   requiredAddIns(1) = ""
'   requiredAddIns(2) = ""
'   requiredAddIns(3) = ""
'   requiredAddIns(4) = ""
   
   For Each requiredAddIn In requiredAddIns
      If InStr(stringOfAddins, requiredAddIn) Then
         msg = msg
      Else
         msg = msg & requiredAddIn & vbCrLf
         listOfDisconnectedAddins = requiredAddIn & " " & listOfDisconnectedAddins
         listOfDisconnectedAddins = Trim(listOfDisconnectedAddins)
      End If
   Next
   
   If msg = "" Then
   Else
        MsgBox "The following important add-ins are not running: " & vbCrLf & vbCrLf & msg & vbCrLf & vbCrLf & "Please save your work, then close and reopen Word."
' Run a batch file that corrects the add-in problems in the registry and pass the list of unconnected add-ins as an argument
        Shell """C:\Word Add-ins fix\fixWordAddins.bat"" """ & listOfDisconnectedAddins & """"
   End If
   
End Sub

Edit the macro to fit your environment. You will need to specify each required add-in’s ProgID in the requiredAddIns array and update the number of add-ins in the array’s definition. The macro needs to be named AutoExec in order to run when Word starts.

This is the message that the user will receive if the macro finds that a required add-in is not Connected.

Clicking OK runs the batch file and closes the window.

The batch file

The batch file is called by the macro when any of the add-ins are not registered and currently connected. The batch file references the .reg file that contains the correct LoadBehavior settings and writes an event to the log with information on the username, the machine name, the datetime that the problem was discovered and which add-in(s) were not connected.

Copy the code and save it as fixWordAddins.bat to the C:\Word Add-ins fix\ directory or wherever you want.

:: A batch file for running a registry merge to set the LoadBehavior for Word add-ins
::
@echo off

REGEDIT /S "C:\Word Add-ins fix\fixWordAddins.reg"

:: Let's create a little log file and output which user ran the script and at what date and time
:: Set some variables for the date. US format - not localized!
@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @( 
	Set Month=%%A
	Set Day=%%B
	Set Year=%%C
)

:: Set some variables for the time.
@For /F "tokens=1,2,3 delims=/: " %%A in ('Time /t') do @( 
	Set Hours=%%A
	Set Minutes=%%B
	Set Meridiem=%%C
)

:: Output to a log file
@echo %username% at %computername% on %Month%/%Day%/%Year% at %Hours%:%Minutes% %Meridiem% (%1) >> "C:\Word Add-ins fix\log.txt"

The registry merge

Add-ins can be ‘hard-disabled’ or ‘soft-disabled’ by Word 2007. Please see my post at fixing Word 2007 add-in issues with a registry merge for more information about what this means. The following registry merge will address both issues.

The registry merge will have to be edited for your environment, too. First, find the LoadBehavior value in the the registry for each of your add-ins in either of two locations:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins\
HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\

If you don’t find your add-in in either of those locations, search the registry for the ProgID.

A LoadBehavior of 3 = loaded (this corresponds to a checked box in Word Options/Add-Ins)
A LoadBehavior of 2 = not loaded (this corresponds to an unchecked box in Word Options/Add-Ins)

The only add-ins that you need to worry about here are those that you want to always run (those that normally have a LoadBehavior of 3). Export those keys and add them to the .reg file.

Copy the code and save it as fixWordAddins.reg to the C:\Word Add-ins fix\ directory or wherever you want. Edit it for the add-ins you wish to load.

Windows Registry Editor Version 5.00

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

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Word\Resiliency]

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

On 64-bit versions of Windows, the add-ins can be found in:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Word\Addins\

The log file

If the log file doesn’t already exist, the batch file will create it. Each time the batch file runs, it adds a line to the end of the log file.

An entry will look something like this:

USERNAME at MACHINENAME on 06/17/2010 at 01:02 PM ("PDFMaker.OfficeAddin")

Caveats

The macros in a *.dotm can’t be edited if that template was opened from the startup location. Open a copy in another location, make your changes and save, and then overwrite the version in the startup location.

Windows 7

Note that in Windows 7, the UAC needs your permission to run a .bat file.

The Word startup location in Windows 7 (put any custom *.dotm files here):
\AppData\Roaming\Microsoft\Word\STARTUP

The default location of Normal.dotm in Windows 7:
\AppData\Roaming\Microsoft\Templates

I’m often given copy for web sites as Word documents. As one would expect, these documents contain all sorts of symbols that should be converted to entities before they can be used in a web page.

For example, ‘smart quotes’ (curly quotes), trademark and registered symbols, em-dashes, and other symbols look great, but can cause problems if you just drop them into a page and don’t use the corresponding character encoding.

Rather than do a global find-and-replace in my HTML editor, I’ve written a few Word macros that replace these symbols.

The first macro, CleanupHTML, replaces smart quotes with straight quotes. The second macro, PrettyHTML, replaces smart quotes with the correct pretty quote, ala .

At some point, I want to extend the macro to replace accented characters, such as è, and also to wrap bold and italics in strong and em tags. Ideally, I’d also find a way of converting lists in Word to straight text wrapped in unordered list items, as lists seem to require the most cleanup when copying and pasting.

Sub CleanupHTML()
'
' CleanupHTML Macro
' Cleanup document for HTML by replacing special characters with entities.
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "&"
        .Replacement.Text = "&"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "©"
        .Replacement.Text = "©"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "®"
        .Replacement.Text = "®"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "™"
        .Replacement.Text = "™"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "--"
        .Replacement.Text = "—"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "—"
        .Replacement.Text = "—"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "–"
        .Replacement.Text = "–"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "…"
        .Replacement.Text = "..."
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "'"
        .Replacement.Text = "'"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = """"
        .Replacement.Text = """"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Sub PrettyHTML()
'
' PrettyHTML Macro
'
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "&"
        .Replacement.Text = "&"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "©"
        .Replacement.Text = "©"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "®"
        .Replacement.Text = "®"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "™"
        .Replacement.Text = "™"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "--"
        .Replacement.Text = "—"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "—"
        .Replacement.Text = "—"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "–"
        .Replacement.Text = "–"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "…"
        .Replacement.Text = "..."
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ChrW(8220)
        .Replacement.Text = "“"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ChrW(8221)
        .Replacement.Text = "”"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "'"
        .Replacement.Text = "’"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "è"
        .Replacement.Text = "è"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
End Sub

Many thanks to
http://celebritycola.blogspot.com/2004/09/preserving-formatting-when-posting.html for getting me started on this.

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

A repository of troubleshooting responses, answers and explanations for over 75 common Windows XP and Office 2007 Help Desk calls.

Windows XP

How to turn off the balloon notifications when jobs are sent to an AD printer

Open the Printers and Faxes control panel (Start button | Printers and Faxes).

Choose File | Server Properties, Advanced tab. Clear the checkmark next to “Show informational notifications for network printers”. OK.

How to change the screen resolution

To change the screen resolution, right click anywhere on the desktop and select Properties.
In the Display Properties window, click on the Settings tab.
Move the Screen Resolution slider to the desired resolution (1024 by 768 pixels is common).
Click Apply to test the changes.

If the new resolution is acceptable, click Yes in the new Monitor Settings window to save the settings.
Click OK to exit.

How to increase the font size within a specific application

The font size can be controlled in three different places, and different applications react differently to changes to these settings.

Font size: Display Properties -> Appearance tab. In the “Font size” menu, choose “Large Fonts”. Click OK.
Message box: Display Properties -> Appearance tab -> Advanced button. Select Message Box from the Item menu, increase the font size from 8 (default) to 11 or higher. Click OK, then click Apply.
DPI: Display Properties -> Settings tab -> Advanced button. Under the General tab, choose an option from the DPI setting menu. Click Yes when asked to skip file copying; click No when asked to restart. Display Properties -> Appearance tab -> Effects button. Check the box next to Use large icons, click OK, OK. Right-click the desktop and deselect Align to Grid. Right-click the desktop and select Align to Grid. Display Properties -> Appearance tab -> Effects button. Remove the check next to Use large icons, click OK, OK.

GroupWise folder list and message list fonts are controlled by Message box and/or DPI. These settings also appear to affect the size of the message body, but to an as yet unknown degree.

DM Explorer folders list and document list font are controlled by Font size and DPI. These settings do not affect the size of fonts in the Document Profile window. Message box has no effect on any DM window.

How to add an IP printer

Open a command prompt and perform an nslookup on the printer name using hypens, not underscores. Ex.: nslookup 22-southeast-a
If the nslookup returns an IP address, the printer can be installed.

Click on Start | Printers and Faxes, then click Add Printer.

The Add Printer Wizard will open. Click Next.
Select the radio button next to “Local printer attached to this computer”.
Uncheck the box next to “Automatically detect and install my Plug and Play printer”. Click Next.
Select the radio button next to “Create a new port” and choose “Standard TCP/IP Port”. Click Next and then Next again.

The Add Standard TCP/IP Printer Port Wizard will open.
Enter the IP address from the nslookup into the “Printer Name or IP Address” field. The Port Name will autofill. Click Next.
Click Finish.

The Add Printer Wizard will open.
Locate the printer driver and install it.

To add a second printer driver to the same physical printer, repeat the process, but make a change to the Port Name.

To set that printer to print a separator page at the beginning of each print job, open the printer’s properties, click the Advanced tab, click the Separator Page button, click the Browse button, click on pcl.sep and then click Open. (The pcl.sep file is located at C:\WINDOWS\system32\pcl.sep) Click OK, click OK.

More info on the escape codes/control characters available for use in a separator page: http://support.microsoft.com/kb/102712

User logs in with a TEMP profile

There are a few reasons that roaming profile users log in to a TEMP profile. The most common reason is that a path to a file is too long to be copied from the Windows NT 5.1 Workstation Profile folder to the workstation.

Review the events in the Event Viewer’s Application log for something that looks like:

Event Type: Error
Event Source: Userenv
Event Category: None
Event ID: 1509
Date:  2/23/2011
Time:  9:29:50 AM
User:  XP2UA0211G0Z2K7\username
Computer: XP2UA0211G0Z2K7
Description:
Windows cannot copy file \\NETWORK\PATH\USERS\username\Windows NT 5.1 Workstation Profile\Application Data\Sun\Java\Deployment\cache\6.0\45\3b01eb2d-38a6579e to location C:\Documents and Settings\username\Application Data\Sun\Java\Deployment\cache\6.0\45\3b01eb2d-38a6579e. Possible causes of this error include network problems or insufficient security rights. If this problem persists, contact your network administrator. 
 
 DETAIL - The system cannot find the file specified. 
 
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

To fix this problem, delete the file from the workstation and the network profile folder (if it exists), then reboot. Sometimes, the file will only exist on the workstation, which makes the description a bit confusing or misleading.

Worth noting is that the event log only shows the path to the first file that prevents the profile from copying. If another file exists, you won’t know about it until you reboot.

How to identify file types that Windows doesn’t recognize

OpenWith.org and FileInfo.com provide information about many file extensions and links to free programs that can open and create each type of file.

How to stop Windows from grouping similar taskbar buttons

All open windows are represented by taskbar buttons. If you have several windows open (for example, if you open more than one file in a single program or if you open several instances of a program such as a web browser), Windows automatically groups open windows from the same program into a single taskbar button.

If you want to stop Windows from automatically grouping similar buttons when no more room exists on the taskbar to display them individually, you can either turn off the grouping feature, increase the height of the taskbar, or do both.

To stop Windows XP from grouping the buttons, right click the Start button, choose Properties, and under the Taskbar tab, remove the checkmark next to “Group similar taskbar buttons”.

To increase the height of the taskbar, unlock it by right-clicking any empty space and clearing the checkmark next to “Lock the Taskbar”. Move the cursor to the top of the taskbar so that it changes to a double-headed arrow, then click and drag upward. Relock the taskbar to prevent it from being moved inadvertently.

Windows XP desktop icons have a thick border

Certain Windows XP desktop icons will have a thick dark border, like a badly rendered drop shadow.

This can usually be fixed by turning off the “Lock Web Items on Desktop” option. Right-click on an empty space on the desktop and hover over Arrange Icons By, then click the “Lock Web Items on Desktop” option to remove the checkmark.

If this doesn’t remove the border, check for a ForceActiveDesktopOn value under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. Remove this key, if it exists (or change the data to 0). To force Windows to never use the Active Desktop, you can create a NoActiveDesktop Dword value with a data of 0.

Word 2007

How to re-enable a ‘hard-disabled’ add-in

Click the Office Button, then click Word Options (Alt+F, I).
Click the Add-Ins tab and scroll to the bottom of the Add-ins list. Note the name of the disabled add-in.
Select Disabled Items from the Manage menu and click Go.
Click the item you wish to re-enable, and click Enable. Click Close.

How to reload a ‘soft-disabled’ add-in

Click the Office Button, then click Word Options (Alt+F, I).
Select COM Add-ins from the Manage menu and click Go.
Place a check in the box next to each add-in you wish to reload and then click OK.

In most cases, the functionality should be available immediately, but closing and reopening Word is recommended.

How to accept Track Changes

Click the Review tab, and in the Changes group, click Accept | Accept All Changes in Document.

How to turn off Track Changes notification

Click on the Office Button, then click Word Options (Alt+F, I)
Click on the Trust Center along the left pane
Click on the Trust Center Settings button
Click on Privacy Options along the left pane
Under the “Document specific settings” area, uncheck the first option, “Warn before printing, saving or sending a file that contains tracked changes or comments”.

Error message: Open Text eDOCS DM | A COM conversation could not be established.

Opening a Word document from DM Explorer causes the following error to appear in Word 2007:

Open Text eDOCS DM
Unable to open the document. A COM conversation could not be established.
[OK]

The DM Integration add-in is disabled. Re-enable it, then reload it, then close and reopen Word.

The document will remain checked out in DM. Proceed through the steps to check it back in.

Error message: Microsoft Office Word | Word experienced a serious problem with the ‘XXXX’ add-in.

Word 2007 will ask to disable add-ins that have prevented Word from opening normally in the past. The error message will contain the add-in name. For example, if Word attributes the problem to the DM COM add-in, the error message will be:

Microsoft Office Word
Word experienced a serious problem with the ‘dmintegration_net.connect’ 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]

Always choose No at this prompt, otherwise the functionality provided by the add-in will be missing.

How to start Word with no add-ins or templates loaded

To create a desktop shortcut that will start Word with no add-ins loaded and without the Normal template, right-click the desktop and choose New -> Shortcut.
Paste the following line into the location field:

"C:\Program Files\Microsoft Office\Office12\WINWORD.EXE" /a

Click Next and give the shortcut a name. Click Finish.
Open Word from that shortcut to bypass all add-ins and templates. This is for troubleshooting add-ins and templates, and should not be used to give a user access to ‘native’ Word. Word opened in this way is not native Word.

Note that opening Word with winword /a will remove from the QAT any buttons that come from COM add-ins.

Error message: Word cannot start the converter mswrd632.wpc.

Attempting to open a Word document (usually a .DOC) causes a pop up message:

Microsoft Office Word
Word cannot start the converter mswrd632.wpc.
[OK]

This is usually due to the file not being a true .DOC file, but instead being a .PDF or .DOCX with an incorrect extension.

The window may be supressed by removing a registry key:

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Text Converters\Import\MSWord6.wpc]

Resource: http://support.microsoft.com/kb/973904

Error message: Microsoft Visual Basic error 5941

Choosing a macro that applies a style to a paragraph causes the following error message:

Microsoft Visual Basic
Run-time error ‘5941’:
The requested member of the collection does not exist.
[Continue] [End] [Debug][Help]

This error occurs when the style called by the macro doesn’t exist in the document.

VP Fix: The Update Styles button will add the Vedder Price styles to the document so that the Indent styles can be applied.

Error message: HRESULT

Copying from a Word document, or saving from Word to DM, generates an HRESULT error.

The error message may be similar to:

Exception from HRESULT: 0x800A0C68

Confirm that the MacPac COM add-in is loaded. The LoadBehavior and Resiliency keys may both need to be changed.

Delete the DM keys:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\AppIntegration\Word\Options]
"EventReplaceDMSaveAs"=-
"EventReplaceDMSave"=-

[-HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\AppIntegration\DM17341]

How to repeat a table row on each page

Put the cursor in a cell in the row to become a header row and under the VP Table Tools tab, Data group, click Repeat Header Rows. You can also right-click in the table cell and choose Table Properties -> Row tab, and place a checkmark next to “Repeat as header row at the top of each page”.

How to toggle table gridlines

Click in the table, and under the VP Table Tools context tab, Table group, click View Gridlines.

(In native Word, this is Table Tools | Layout | View Gridlines.)

How to sort tables in Word

Put the cursor anywhere in the table, then click the Table Tools context tab. Click the Sort button in the Data group to open the Sort dialog box. Pick which column to sort on and the desired order.

How to make Word display more information about your document

Word can display useful information about your document in the status bar at the bottom of the application window. Right-click an empty area of the status bar and choose what information you wish to display.

You can choose to display such things as Word Count, current Section, current Page, and Track Changes.

How to sum a column in a Word table

Place the cursor in the table cell that will hold the sum, then click the Table Tools context tab. Click the Formula button in the Data group to open the Formula dialog box.

In the Formula field, type: =SUM(ABOVE)

Click OK.

How to get the style area pane back

Click the Office Button, then click Word Options (Alt+F, I).
Click on Advanced, then scroll down to the Display area.
Enter a value in inches next to “Style area pane width in Draft and Outline views:” (1″ is a good starting place.)

Once the style area pane is visible, it can be dragged to resize.

How to convert straight quotes to curly quotes

Confirm that your Word options are set to use smart (curly) quotes:

Word Options -> Proofing -> AutoCorrect Options -> AutoFormat As You Type. Check the box next to “Straight quotes” with “smart quotes”.

Do a Find and Replace (Alt+H) on both single quotes and double quotes.

How to print a document and include the markup (comments and track changes)

Click the Office Button -> Print.
In the Print options window, under the “Print what” menu, select “Document showing markup”.
Click OK.

Buttons added to the QAT disappear when Word is closed and reopened

Quick Access Toolbar buttons created from custom controls disappear when Word is closed and reopened.

Custom controls are non-native Word commands that exist in startup templates other than Normal.dot, in COM add-ins, etc.

To find out whether a command is a custom control, click on the Office Button -> Word Options -> Customize. Locate the command you wish to add to the QAT and hover over it. A tooltip will pop up and display the location of the command. If the tooltip contains the text CustomControl, the button will disappear when Word is closed and reopened.

A command that will not stick:
Save As… [tooltip: Office Menu | Save As… (CustomControl)]

A command that will stick:
Save As [tooltip: Office Menu | Save As (FileSaveAs)]

The problem is due to a bug in a template (PwdMonikerConverter.dot in C:\Program Files\Microsoft Office\Office12\STARTUP) that is necessary for certain DM functionality.

The vendor (Open Text) is aware and is working on a fix.

As a workaround, you can set the read-only attribute of Word.qat to prevent the template from removing buttons. A description of two Word macros that switch the attribute can be found at //ardamis.com/2010/11/02/a-macro-for-toggling-the-read-only-attribute-of-word-qat/.

How to create a Paste Special as Unformatted Text button on the QAT

The following macro can be added to a template and a button added to the QAT.

Sub PasteSpecialAsUnformattedText()
'
' PasteSpecialAsUnformattedText Macro
'
'
     Selection.Collapse Direction:=wdCollapseStart
     Selection.PasteSpecial DataType:=wdPasteText
End Sub

Source: http://msdn.microsoft.com/en-us/library/bb241758(office.12).aspx

The keystroke to bring up the Paste Special menu is Alt+Ctrl+V.

How to apply Word’s ‘password to open’ protection to a document already in DM

Open the document you wish to password-protect.
Click the Office Button -> Save As.
Cancel out of the DM version Save As window.
In the native Word Save As window, click the Tools button in the lower left and choose General Options.
Enter a “Password to open”, click OK, and confirm the password.
Save the document to your hard drive.

Click the Office Button -> Save As -> Save As DM Version.
Choose the document and then the version you wish to replace. Click OK.
Choose to Replace Original. Click OK.

Close the document and reopen it from DM to confirm that you are prompted for a password. Enter the password and open the document to confirm the password is correct.

How to edit or remove the footnote separator

Open the Footnotes pane by clicking the Show Notes button under the References tab. Select Footnote Separator from the menu in the Footnotes pane. Highlight the separator and edit or delete it.

Word is displaying the native QAT

The location of the QAT has been moved from \Local Settings\ to \Application Data\Microsoft\Office\ so it will be included in the roaming profile. A registry change must be made to point Office to the correct location of the QAT.

VP Fix: The Local Settings Profix Fix zen will change this setting in the registry.

Background: http://support.microsoft.com/kb/958062/

Documents print with a 3-inch top margin and the text extends off the bottom of the paper

The issue is that the print will start 3″ down the page on documents that are printed AFTER you print a document that contains Track Changes or Comments.

The fix is to enable Background Printing as follows:

1. Go to your Office Button in the upper left corner in Word
2. Select “Word Options” from the lower right corner
3. Select “Advanced”
4. Scroll to the Print section
5. Check the box that reads “Print in Background”
6. Click OK

Update: This problem has been addressed by Microsoft and a fix now exists.

How to insert an image of a handwritten signature into a Word document

I recommend creating a transparent .png file to use as a handwritten signature. Sign a blank piece of paper, scan it to PDF using a digital sender, and open the PDF in Adobe Photoshop. It should be possible to export the image as a .png with a transparent background.

Being transparent, the .png file can overlay elements in the document, such as signature lines, so it looks more like a real handwritten signature.

To insert the image into a Word document, click on the Insert tab, then click the Picture button. Cancel out of the DM Quick Retrieve window and choose Yes when asked if Word should open a document.

Browse to the image file and double-click it. The image will be inserted into the document.

In the document, click once on the image, then click on the Format context tab. Click on Text Wrapping and choose In Front of Text.

The image now exists outside of the flow of the paragraphs and can be dragged around in the document, even on top of signature lines.

How to update the fields in a form

The F9 key updates the fields in a form.

To add an Update button to the QAT: Click the “Customize Quick Access Toolbar” button on the QAT and choose More Commands. Select All Commands from the “Choose commands from” menu, and add the “Update” button.

How to prevent fields in a Word document from updating automatically

**Testing required**

To lock a field, hit Ctrl+F11. To unlock it, hit Ctrl+Shift+F11.

Background: http://support.microsoft.com/kb/211629

Locations of Word 2007 template startup folders and their typical contents

C:\Documents and Settings\\Application Data\Microsoft\Templates
This location is empty

C:\Documents and Settings\\Application Data\Microsoft\Word\STARTUP (not used by Word?)
This location contains:
pdfDocs.dot * a copy (same timestamp and size, but different capitalization in the filename) of pdfDocs.dot that exists in C:\Program Files\The Sackett Group\Personal (this file is not loaded by Word)

C:\Program Files\The Sackett Group\Startup
This location contains:
MacPac Numbering.dotm
mp10.dotm * different timestamp and filesize than the mp10.dotm file in C:\Program Files\The Sackett Group\Personal (this file is loaded by Word?)
pdfDOCS.DOT * a copy (same timestamp and size, but different capitalization in the filename) of pdfDocs.dot that exists in %appdata%\Microsoft\Word\STARTUP (this file is loaded by Word)
VP.dotm

C:\Program Files\The Sackett Group\Personal
This location contains:
mp10.dotm * different timestamp and filesize than the mp10.dotm file in C:\Program Files\The Sackett Group\Startup (this file is not loaded by Word?)
Normal.dot
Normal.dotm

C:\Program Files\Microsoft Office\Office12\STARTUP
This location contains:
dmintegration.dotm
PwdMonikerConverter.dot

Excel 2007

How to copy just the data (not the formulas) to a new sheet while retaining the formatting

This is a two step process.
If you copy everything, then do a Paste Special and choose Data, you lose the formatting.
If you copy everything, then do a Paste Special and choose Formulas, you keep the formatting, but also get the formulas.
The solution is to first to copy the formulas and formating, then convert the formulas to data.
Select all, then copy and paste into the new sheet. Then select everything again and Paste Special -> Values.

How to sum or average a column of numbers

Click in the cell that you want to hold the result.
Click on the ‘fx’ button to the left of the formula field, then select the desired function from the menu. Click OK.
Either enter the cells to be calculated in the Function Arguments window, or just click and drag to select them from the sheet. Click OK.
The result will appear in the cell. Clicking on the cell shows the function used in the function bar.

How to add leading zeros to a column of zip codes

Select all of the cells in the column, right-click any cell and select Format Cells. Under the Number tab, choose Special, and a Type area will appear. Choose Zip Code as the number type and click OK.

How to print a spreadsheet on a single page wide

Formatting an Excel spreadsheet to print on one page in landscape is a multi-step process. It may be easier to remember the process if the necessary steps are added as buttons to the QAT.

The buttons we’ll want are:

Normal View
Page Break Preview
Clear Print Area
Set Print Area
Scale to Fit
Page Orientation
Print Preview

To modify the page breaks, first click on Page Break Preview. The existing page breaks will show up as blue lines. Solid lines indicate the perimeter of the document’s printable area. Dashed lines indicate where each page in the document will break.

If the solid blue line does not surround all of the data you wish to print, you can either drag the line into position or click Clear Print Area. You can also click and drag to select the cells you wish to print and then click Set Print Area.

To scale the spreadsheet to print on a single page wide (unlimited pages long), click on Scale to Fit, click in the Width field and choose 1 page. The percentage scale will adjust automatically.

Click on Page Orientation and choose Landscape.

Click on Print Preview to review the document before printing.

Print the document or close Print Preview.

Click on Normal View to return to your document.

How to freeze panes

Click on View, and in the Window group, click on the Freeze Panes menu button.

The top option acts like the Freeze Panes button in previous versions of Excel, whereby all the rows above the active cell and all the columns to the left of the active cell become frozen.

The other two options freeze just the top row or just the top column.

How to make the height of a row autofit to the contents of the cell

Move the cursor to the bottom of the box that contains the row’s number. It should change to a line with an up-ward and down-ward facing arrow. Double-click.

409.50 is the maximum height for Excel rows and cannot be changed. Increase the width of the column if you need to display more text.

http://office.microsoft.com/en-us/excel/HP051992911033.aspx

PowerPoint 2007

Access 2007

How to construct a search query when the phrase contains operators

Searching for a phrase that contains operators like IS, OR, or IN will cause an error. As an example, to search for the phrase object is currently in use elsewhere, use the following query:

Like "*" & "object is currently in use elsewhere" & "*"

MacPac 10

Opening Word or clicking on the MacPac10 tab produces an error

MacPac
Error: SessionException
Description: Could not initialize the session.

The details of the error message contain text referencing errors connecting to databases.

The fix is to close Word, delete the file:
C:\Program Files\The Sackett Group\MacPac\Data\mp10Sync.mdb

Open Regedit and navigate to:
HKEY_CURRENT_USER\Software\The Sackett Group\Deca\Sync\
and change the Executing value to 0

Reopen Word.

Copying text in Word causes an “Object variable or With block variable not set” error

Legal MacPac 10
The following unexpected error occurred:

Description: Object variable or With block variable not set
Source: MP10

[OK]

Closing and reopening Word seems to get around this problem, but it’s not a bad idea to check that the MacPac COM add-in is loaded. When pdfDOCS OCRs a PDF as a Word document and opens the output document in Word, it opens a second instance of Winword.exe. Although this second instance of Word alone isn’t enough to cause the problem, if Word is launched without MacPac COM integration, selecting text and hitting Ctrl+C will generate the error.

Inserting a trailer produces a “Could not assign saved data” error

The following error message is displayed when inserting a trailer into the footer:

MacPac
Could not assign saved data to the variable Include Draft. It is possible that the specific value is no longer valid (see the detailed error message below). The default value will be used.
Could not execute the action with the following Execution Index: 1.
[OK]

This error appears after the document is first saved to DM, after the user chooses to insert a trailer into the document’s footer at the automatic Insert/Remove Trailer/Doc ID prompt.

Choosing None at the Insert/Remove Trailer/Doc ID prompt avoids the cause of the error.

The issue may be with the document if MacPac is trying to insert a trailer into a protected form and cannot. Try closing and reopening the document, manually inserting/updating the trailer from the MacPac 10 tab, then resaving.

Inserting a trailer produces a “COMEventException” error

The following error message is displayed when inserting a trailer into the footer:

MacPac
Error: COMEventException
Description: Could not refresh the document’s Word tags collection
Would you like to view more detailed information about this error?
[Yes] [No]

The trailer then appears as, literally: Doc ID Include Date Include time

It is inserted outside of the normal trailer area.

The fix appears to be to delete the document’s MacPac schema and then transform.

To remove the schema:

Developer tab | Schema, remove the checkmark next to MacPac10 Document Schema, then accept the change. Transform the document, then address any problems with the document as a result of the transform (duplicated text, missing data, etc.).

Inserting a trailer produces an “Unhandled exception” error

The following error message is displayed when inserting a trailer into the footer:

Insert/Remove Trailer/Doc ID
Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[Details] [Continue]

Clicking the Continue button cycles back to the error message. Hold the Esc key for a moment to clear the error message. The document should have been saved successfully, but it will not have a trailer. Insert the trailer manually and resave.

How up insert or update the MacPac trailer

Click on the MacPac 10 tab, then click on the Trailer/Doc ID button in the Document group. Choose a location for the trailer any any other options and click OK.

How to add users as Authors in MacPac

Click on the MacPac 10 tab, then click the People button.
In the Manage People window, click on Import People.
Highlight any user and then click the right-arrow to add them to the My People List.
Close the windows. The author will appear in the Authors list on newly created documents.

How to toggle MacPac field codes

The MacPac field codes’ visibility can be toggled with Ctrl+Shift+X.

In the case of a letter, you’ll notice that the last 4 ’empty’ paragraphs actually contain field codes. Deleting these paragraphs will cause problems later, when MacPac tries to read or write information from those codes and cannot.

If you attempt to delete the empty paragraph mark, MacPac may display a warning:

MacPac
You are deleting the paragraph mark between MacPac fields. This may cause unexpected results. Do you want to continue with this deletion?
[Yes] [No]

Choose No.

How to print envelopes with or without Word-generated addressee information.

The naming convention is a little counter-intuitive.

If you’re using an engraved envelope, you want to select the Plain Envelope segment from the MacPac task pane. (It’s the segment that’s ‘plain’ – not the envelope.)

If you’re using a plain (non-engraved) envelope, you want to select the Firm Envelope segment from the MacPac task pane.

DM

How to check-in documents in DM

Close Word, DM Explorer, and any other applications with DM integration.

Hit Ctrl+Shift+Esc to open Task Manager and end the DM.exe process.

Reopen DM Explorer from the desktop shortcut, locate the document, then view the history of the document and confirm that no one else is working in it and that the last Edit entry is timestamped as of your last save. If the last Edit timestamp does not correspond to your most recent attempt to save the document, retrieve the local copy from C:\Shadow\temp.

If there is no doubt that you were the last editor of the document and that the network copy is current, right-click the document and choose Check-in.

Choosing Check-in merely tells the server to no longer consider the document to be checked-out. It does not perform a save or transfer your local copy to the server or sync the local and remote copies.

Microsoft .NET Framework error when saving to DM

Saving to DM (from Word or Adobe Reader) throws a Microsoft .NET Framework error:

Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[Details] [Continue]

The normal Document Profile window fails to be built, and Word is not responsive.

It is possible to end the DM.exe process in Task Manager to close the error window and the Document Profile window. Dismiss the RPC Server warning window and save the document locally.

This seems to happen on our HP Core i5 workstations that use the Intel reference graphics driver [Intel(R) Graphics Media Accelerator HD], and to-date there have been no reoccurances of this problem after updating to the latest graphics driver [Intel(R) HD Graphics] from the HP support site.

Error message: System.IO.IOException

Opening Word 2007 causes the following error to appear:

Hummingbird DM
System.IO.IOException: The process cannot access the file ‘C:\logs\DM_DEBUG_APPINT_WORD_LOG.txt’ because it is being used by another process.
[OK]

Each time Word opens and the DM COM add-in is loaded, DM attempts to open and write to this log file. If a second instance of Word is opened, the message appears because that instance of Word cannot gain access to the log file.

The message window can be safely closed, but open Task Manager and end the multiple Winword.exe processes. Relaunch Word and, if necessary, choose not to disable any add-ins.

The error can also occur if the current user does not have local administrator rights (although I consider this to be a defect).

How to email just a redline attached to a DM document, without the clean or modified version

Open DM, locate the document, right-click it and select Mail.
In the “Document Mailing Options” window, choose “Select” in the “Versions” drop down menu. The window will expand.
(Note that the Versions tab is active and one of the document’s versions has a grey highlight.)
Click the Attachments tab and click the attachment you wish to mail.
Click on the Versions tab. You should see one of the versions is now highlighted with a blue background.
Ctrl+click the highlighted version to deselect it.
Click OK to create the email with just the attachment.

How to stop DM from intercepting the “Browse for file” functionality in some web sites (IE only)

When using Internet Explorer, DM may launch when you try to browse for a file, preventing you from browsing your local files. Firefox is not affected.

Open DM Explorer, then right-click the Hummingbird DM Interceptor icon (the DM icon with a lightning bolt) in the system tray and clear the check next to Internet Explorer to remove the integration. The integration will be re-enabled after a reboot or if the Interceptor.exe process is stopped and restarted.

How to save a document as a new version of an existing document

Click the Office button | Save As | Save As DM Version.
Locate the document to which a version should be added and click OK.
Select the latest version and click OK.
In the Save As window, choose New Version. Click OK.

How to set the default launch method (default application)

Click DM Explorer | Options | Defaults | [Application]. Check or uncheck the boxes, as needed. Clearing all boxes causes a ‘choose an application’ prompt to appear each time that filetype is opened.

GroupWise 7

GroupWise opens and displays a message that a newer version exists

There is new GroupWise software available, however, you cannot currently access the new software to update. Please contact your administrator.
Do you want to continue to receive this update message?

Click No to stop seeing this message.

If the message continues to occur each time GW is opened, increment the value of:
[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\GroupWise\Client\5.0]
“NewSoftwareBump”=”1”

How to use the “Save to Hummingbird DM” button in GroupWise

Open the mail message and click the “Save to Hummingbird DM” button.
Uncheck the box next to the envelope.
Check the box next to “Save attachments separately”.
In the Attachments drop down menu, choose “Save using specific options”.
Click OK.

Check the box next to the attachments that you want to save and uncheck the “Mime” or “TEXT.htm” item, which is the mail message itself.
Click OK and complete the profile for each document.
Click Save.

You may need to hit F5 to refresh DM if the documents do not appear.

How do I edit the HTML signature using an external editor?

There is no way to directly edit the HTML code of the signature in GroupWise 7 or to paste source code into the WYSIWYG editor window, but you can still use an external editor (Dreamweaver, Notepad, etc.) to create the signature.

First, create the signature in the external editor and save it as an .html file. Open the file in a browser, so that the HTML is rendered and displays as it should in the email. Then select and copy the rendered HTML and paste it into the signature window in GroupWise.

(The Vedder Price blue is Pantone 8203 C, close to RGB 57,115,145.)

How to disable the splash screen in GroupWise Notify

Opening Notify sometimes causes the splash screen to stick. Ending the notify.exe process removes the splash screen. A more permanent fix is to not display the splash screen at all when Notify starts.

Edit the GroupWise Notify shortcut in the Startup folder to add a /bl switch to the Target path, e.g.: C:\Novell\GroupWise\notify.exe /bl

How to change the default font size for received HTML messages

In GroupWise 7.x, the default font for printed HTML emails (incoming) is controlled by the “Message Box” font in Windows. The Message Box font can by changed by going to Display Properties -> Appearance -> Advanced -> Item: Message Box. (Tahoma 8 is the default for XP, but Tahoma 10 is a better choice here.)

How to print an HTML email without the [User] – [Subject] header

There are many methods for printing emails. Below are some methods and the results.

Right-click an HTML email in a folder and select View, then right-click in the message body area and select Print.
Email prints without the [User] – [Subject] header.

Highlight an HTML email in a folder and click File -> Print.
Email prints with the [User] – [Subject] header.

Highlight an HTML email in a folder and click the Print toolbar button.
Email prints with the [User] – [Subject] header.

Open an HTML email and click File -> Print.
Email prints with the [User] – [Subject] header.

Open an HTML email and click the Print toolbar button.
Email prints with the [User] – [Subject] header.

Right-click an HTML email in a folder and select Print.
Email prints with the [User] – [Subject] header.

Open an HTML email, right-click in the message body and select Print.
Email prints without the [User] – [Subject] header (but also prints without the From, To, Date, Subject, and Attachments lines).

Right-click an HTML email in a folder and select View, then click File -> Print.
Email prints with the [User] – [Subject] header (but also prints the From, To, Date, Subject, and Attachments lines twice).

Right-click an HTML email in a folder and select View, then click the Print toolbar button.
Email prints with the [User] – [Subject] header (but also prints the From, To, Date, Subject, and Attachments lines twice).

How to print an HTML email received as an attachment without the [User] – [Subject] header

Open the containing email.
Right-click any attachment and select Print.
Highlight the Embedded Msg(s) that correspond to the attached email(s) you wish to print. (Use Ctrl+Click to select multiple, non-contiguous items.)
Click Print.

Where are file attachments saved?

C:\Documents and Settings\[username]\Local Settings\Temp\XPgrpwise

Em-dashes and other non-ASCII characters are converted to asterisks

The fix is to prevent the GroupWise spell check feature from replacing typed text with special characters.

Open GroupWise and click New Mail.
Type anything in the body of the email, then click Spell Check.
(If prompted, click No at the Close Spell Checker prompt.)
Click Customize in the Writing Tools window, and select User Word Lists.
Select the “–” item in the “Word list contents” box and click Delete Entry.
Delete any other entries that may be causing issues (copyright mark, registered mark, etc).
Click Close twice.

How to monitor two GroupWise accounts at once

If you have proxy access to another user’s GroupWise account, you can have both accounts open simultaneously in different instances of GroupWise.

To do this, open GroupWise, then drag the Mailbox icon from your folder list to your desktop. This will create a shortcut named ‘Mailbox.GWF’. Run the shortcut and a second instance of GroupWise will open. Change the proxy in either instance to view both accounts simultaneously. (This works best if you have two monitors – one for each instance.)

Confusingly, your default mail account (the ‘From’ account used when another application creates a mail message) will be whichever GroupWise window last had focus.

How to stop the Select an Entry… window from opening

The Select an Entry… window appears when entering recipients into the To field on a new mail message for two reasons.

If the contact exists in multiple address books, the window will open. This is the desired behavior, in most cases.

If the contact does not exist in multiple address books, or does not exist in any address books, the Select an Entry window may appear and display the contents of the system address book. This is not desired behavior, and can be fixed by right-clicking the To field and clearing the checkmark next to Search Mode.

The setting is controlled by the following registry key:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Novell\Groupwise\Address Book - User Interface]
"Name Search Mode"="No"

This has also been resolved by reinstalling GroupWise (or updating to the latest version).

Emails composed in HTML are converted to plain text after being sent or saved to Work in Progress

If the default compose view is HTML and a new email is created and then either sent or saved as a draft (to Work in Progress or any other folder) before any text is entered in the message body, the email is converted to plain text.

Adding an HTML signature changes this behavior in the case of sent, but not saved, emails. If the email is composed and immediately sent, it is sent as HTML with the HTML signature. If the email is saved as a draft, opened and sent, it is still sent as plain text, and the HTML signature is converted to plain text.

The work around is to enter any text (even just an empty space) into the message body before the email is sent or saved as a draft. Entering text and deleting it also works.

How to resize the attachment pane in GroupWise 7

The bar above the attachment pane could be dragged in GroupWise 6.5, and appears to be an issue introduced in GroupWise 7.

If the default View is “Mail” under Environment | Views, the bar separating the body pane from the attachment pane cannot be dragged up or down to resize the attachment pane. Changing the message View to HTML allows the attachment bar to be dragged and the pane resized. However, using Mail (Simple) or HTML has undesired consequences, namely that the recipient of the email will a different message window.

The workaround is to leave the default View as “Mail” and temporarily change this setting on a per-message basis. Open a new mail window, right-click in the border around the message body and select “Change to…”. Choose HTML in the Views menu and click OK. Click and drag the bar as desired. Before sending the message, right-click the border and set the view back to Mail.

A ‘Find’ is not returning the expected results

A Find for sent mail items on either all or part of the friendly name or email address returns a partial result set, but does not return all of the expected results.

The work around is to search for a string that is common to both the friendly name and email address, wrapping the string in asterisks.

For example, to find all messages to “Joe Smith “, the common string is “smith”, so the search criteria entered into the TO/CC field would be: *smith*

HTML emails open with a blank message body

Certain HTML emails received from external sources display a blank message body when opened. Replying to or forwarding the message displays the body contents in the new mail window. Other mail clients are able to properly display the message body.

This seems to happen when the email is sent with a “Content-Type: multipart/related;” subtype.

More information: http://forums.novell.com/novell/novell-product-discussion-forums/groupwise/groupwise-7x/gw7-clients/98000-body-area-html-email-completely-blank.html

Received emails with attachments do not show the attachment window when opened

Certain emails received from external sources that contain attachments do not display the attachment window when opened. The email does not display the paperclip icon in the Mailbox; there is no indication that the email contains an attachment. Other mail clients are able to display the attachments.

The attachments are viewable in GroupWise by clicking File | Attachments | View, which opens the email in a new window with the attachments displayed at the top.

This seems to happen when the email is sent with a “Content-Type: multipart/related;” subtype.

Novell Support TID #10100263 seems to indicate that the problem is resolved in GroupWise 7 SP1, but there may have been a regression in a later update, as it continues to be a reported issue in GroupWise 7.0.3. The Support TID contains instructions on testing whether the subtype is at fault.

More information: http://www.novell.com/support/php/search.do?cmd=displayKC&docType=kc&externalId=10100263&sliceId=&docTypeID=DT_TID_1_1&dialogID=1943723&stateId=0%200%201941569

CA RM (Filesurf)

Users are unable to access FileSurf through the Full Client and GroupWise Client.

Start -> Programs -> FileSurf -> FileSurf Client Configuration
In the top left of the dialog box, click the ‘Actions’ menu.
Make sure there is no check mark by the line ‘DCOM Security’. If there is, deselect it and click ‘Apply’ on the dialog box.

To test/confirm settings, press the ‘Test Connection’ button on the dialog box. You should get a message saying ‘Test Connection Succeeded’.

Error message when filing emails

Folder must be mailbox or personal folder to file messages.

The folder that contains the message is likely inside another folder, such as Work in Progress or Documents, that CA RM is not allowed to access. Move the folder into its proper location, then close and reopen GroupWise.

Firefox

Firefox fails to open with an error message

Close Firefox
Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

A look at the processes shows no firefox.exe process running. Restarting the system does not resolve the issue.

There is a profiles.ini file in
C:\Documents and Settings\[username]\Application Data\Mozilla\Firefox

That file contains a line that points to a subfolder in
C:\Documents and Settings\[username]\Application Data\Mozilla\Firefox\Profiles

The subfolder will be named something like fi1dzouf.default. If this *.default subfolder is missing or if the path is incorrect, the error is generated.

To resolve, delete the *.default subfolder (if it exists) and profiles.ini file from
C:\Documents and Settings\[username]\Application Data\Mozilla\Firefox

This will reset Firefox to factory default.

(If the user has a roaming profile, it may be possible to retrieve a backup of the *.default folder and profiles.ini from the H: drive. Restoring these backed-up files will preserve any customizations and add-ins.)

Firefox displays a blank screen instead of a PDF file

Launch Adobe Reader/Acrobat, click Edit | Preferences, then choose Internet. Remove the check next to “Display PDF in browser”, click OK, close Reader. Reopen Reader and put the checkmark back.

If this does not resolve the problem, trying copying the nppdf32.dll file from “C:\Program Files\Mozilla Firefox\plugins” to “%appdata%\Mozilla\Plugins”. The Plugins folder under %appdata%\Mozilla may need to be created manually.

Internet Explorer 7

How to clear the remembered form data in IE

Delete saved form data by clicking Tools | Internet Options | Delete | Delete forms… Choose Yes, then Close, then OK.

How to configure what IE autocompletes

What form data IE remembers and attempts to autocomplete can be configured by clicking Tools | Internet Options | Content tab. In the Autocomplete area, click Settings. Choose what to remember and then click OK.

How to delete your temporary internet files (Windows XP/IE7)

Open IE and click Tools, Internet Options. Under the General tab, in the Browsing history area, click on the Delete button. The Delete Browsing History window opens. From here, choose what to delete.

Users with roaming profiles will also need to clear the cookies that are backed up to the network when they log off. Navigate to the H: drive, open the folder named “Windows NT 5.1 Workstation Profile”, then open the Cookies folder. Hit Ctrl+A to select everything. Then hold the Ctrl key and click on the file named ‘index.dat’ to deslect it. Hit the Delete key. A moment will pass while the PC checks the cookies, then you will be prompted to confirm the deletion. Click OK.

A special case…

For some reason, the expected behavior of the Delete Browsing History function on my PC does not delete cookies. I’ve checked other PCs and found that the function works correctly to delete files, including cookies, from all locations. Below are the steps that I take to delete my cookies.

To delete the Temporary Internet Files saved to:
C:\Documents and Settings\[username]\Local Settings\Temporary Internet Files\

This location is used by IE7 to store temp files but not cookies.

Open IE and click Tools, Internet Options. Under the General tab, in the Browsing history area, click on the Delete button. The Delete Browsing History window opens. From here, choose what to delete.

Warning: The “Delete cookies” button does not actually delete the cookies.

To delete the Temporary Internet Files and Cookies saved to:
C:\Downloads\Temporary Internet Files

This location is used by IE7 to store temp files and cookies.

The steps above will delete temporary files from this location, but not cookies.

To clear the cookies (and any other temporary files), right-click the Start button and choose Explore. Navigate to C:\Downloads\Temporary Internet Files. Hit Ctrl+A to select everything. Hit the Delete key. This will delete the temp files but not the cookies. Click Yes when asked if you’re sure you want to delete the selected Cookies. Confirm that all of the files have been deleted.

Files deleted from this folder are also removed from C:\Documents and Settings\[username]\Local Settings\Temporary Internet Files\.

To delete the Cookies saved to:
C:\Documents and Settings\[username]\Cookies

This location sometimes contains cookies, but on my PC, IE doesn’t seem to always use this location.

To clear the cookies, right-click the Start button and choose Explore. Turn on ‘Show hidden files and folders’ and turn off ‘Hide protected operating system files’ under Folder Options, View tab. Navigate to C:\Documents and settings\[username]\ and open the hidden Cookies folder. Hit Ctrl+A to select everything. Then hold the Ctrl key and click on the file named ‘index.dat’ to deslect it. Hit the Delete key. A moment will pass while the PC checks the cookies, then you will be prompted to confirm the deletion. Click OK.

What are the default Header and Footer codes and margins for IE7

Header:
&w&bPage &p of &P

Footer:
&u&b&d

Margins:
0.75 for all margins

Novell

Novell ZENworks

Solutions to common ZEN problems.

Problem: The ZEN icon in the system tray is missing.
Solution: Start the ZEN Notify Icon process by running ZenNotifyIcon.exe from C:\Program Files\Novell\ZENworks\bin\

Problem: Right-clicking the ZEN icon in the system tray throws an error: “The ZENworks Service does not appear to be running. Please restart the service and try your request again.”
Solution: Open the Task Manager and end the ZenNotifyIcon.exe process. Restart the process by running ZenNotifyIcon.exe from C:\Program Files\Novell\ZENworks\bin\

Problem: ZENworks Properties displays “Unavailable” for Management Zone, Server DNS, and Server Address, and Logged In As: Not Logged In.
Solution: Start the Novell ZENworks Agent Service, then right-click the blue Z icon and log in as the user. (ZENworks is not running, and the user is not logged in.)

Problem: ZENworks Properties displays the expected values for Management Zone, Server DNS, and Server Address, but Logged In As: Not Logged In.
Solution: Right-click the blue Z icon and log in as the user. (ZENworks is running, but the user is not logged in.)

Problem: The ZENworks Window (that normally displays the list of available ZENs) is empty.
Solution: Start the Novell ZENworks Agent Service, then right-click the blue Z icon and log in as the user. (ZENworks is not running, and the user is not logged in.)

Problem: The ZENworks Window (that normally displays the list of available ZENs) is missing most of the ZENs, but displays a partial list.
Solution: Right-click the blue Z icon and log in as the user. (ZENworks is running, but the user is not logged in.)

It is uncommon that the machine needs to be unregistered and then re-registered with ZEN in order to fix problems. Even more rare is the problem that requires the ZEN cache to be cleared. If the problem is not resolved by the above steps, it’s a good idea to check with the ZENworks administrator before clearing the cache.

It’s also a good idea to check the workstation object in the Novell ZENworks Control Center before and after unregistering the workstation, to make sure that the object has been removed, and that there aren’t multiple objects for a single workstation.

Adobe Reader 9

How to print comments in Adobe Reader

Click File | Print, and choose “Document and Markups” from the Comments and Forms menu in the Print dialog box.

How to print Sticky Notes in Reader

Sticky Notes do not print in Reader 9 by default. Reader’s default settings allow printing of some comments, but not Sticky Notes, by clicking File | Print, and choosing “Document and Markups” from the Comments and Forms menu in the Print dialog box.

Printing of Sticky Notes can be turned on in Acrobat Pro by clicking Edit | Preferences | Commenting and choosing to “Print Notes and Popups”, but there is no Commenting area in Reader’s preferences.

Sticky Notes printing in Reader can be turned on with a registry setting. Create the following key if it does not already exist, and be sure to use the appropriate Reader version. The example below is for Reader 9.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\Annots\cPrefs]
"bprintCommentPopups"=dword:00000001

How to print only the top 8.5 x 11 inches (letter size) of a 8.5 x 14 inch (legal size) PDF in Adobe Reader

Click File | Print, and under the Page Handling area, select Page Scaling: None, and uncheck Auto-Rotate and Center.

The preview should have the top portion of the document highlighted.

How to email PDFs from the Reader IE plugin

Right-click the Print or Save button in the Reader menu bar and place a check next to Email.

A new button (an envelope) will be added to the toolbar. Clicking the button will open a prompt asking you to choose how to email the document – as a link or as a file. Choose one and the new mail message will be created.

In Reader 9, this setting is saved to:
HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\AVGeneral\cToolbars\cFile\cExternalButtons

Error message: “invalid plugin detected. Adobe Reader will quit”

The fix is to remove the problem plugin from C:\Program Files\Adobe\Reader 9.0\Reader\plug_ins. The “FulHigh.api” plugin seems to be a common culprit.

The “FulHigh.api” plugin is installed when a PDF is previewed in DM Explorer Extensions using the Viewer tab, when the PDF is located as a result of a full text search. (The exact specifics are still unclear.)

Winzip

Workshare

How to set the default save and email attachment file types

To set the default save file type:
Hit the F4 key to enter Workshare Professional Configuration. Choose Document Management and select Document Format. Change the value in the menu and click OK.

To set the default email attachment file type:
Hit the F4 key to enter Workshare Professional Configuration. Choose Administration, expand Email and select Default Email attachment format. Change the value in the menu and click OK.

Error: Workshare Professional was unable to perform the full comparison using the current settings.

Workshare Professional
Workshare Professional was unable to perform the full comparison using the current settings. Workshare Professional therefore performed the comparison using reduced settings.
Please refer to the Redline Options Summary (displayed at the beginning or end of the comparison) for details of which settings were disabled.

Check the last page of the redline for a table containing the redline options. The last row typically contains the message:

Nested tables that could not be compared are shown as whole original and modified

This is usually due to a problem in the footer tables in one or, more commonly, both documents. Open both documents and delete and remake the footer tables on the first page that displays the problem according to the redline. Save and recompare.

DTE

How to change the default settings for new time entries

Create a new default entry by clicking Insert New Entry, clearing all fields, checking the Default box, and clicking OK.

Cannot print from DTE

DTE prints only to the default printer. If DTE is open when the default printer is changed, it must be closed and reopened.

Pages print with incorrect margins

Replace the .INI files in C:\DTE with those in the DTE folder on the S: drive.

Hardware

How to update the firmware on an HP printer or digital sender

FTP the correct firmware update (an .RFU file) for that model printer or digital sender into the PORT folder.

After the file has been transfered, the machine will automatically update itself and then reboot. A message will be displayed on the printer that a software update is in progress. If the printer has an embedded Jetdirect card, its firmware will be updated as well. If it has an external Jetdirect card, the firmware for the card will have to be updated separately. The HP Download Manager can be used to update just the Jetdirect card.

The printer firmware can be located at:

http://www.hp.com/go/LJ4250_firmware

http://www.hp.com/go/LJ4350_firmware

http://www.hp.com/go/LJ4300_firmware

http://www.hp.com/go/LJP4015_firmware

The digital sender firmware can be located at:

http://www.hp.com/go/9250c_firmware

Configuring the manual feed tray

To configure an HP printer so that the manual feed tray (Tray 1) will pull any loaded paper without prompting the user to confirm the paper size, push the Checkmark button on the printer to enter the menus, then set the following options:

Paper Handling | Tray 1 Size = Any Size
Paper Handling | Tray 1 Type = Any Type
Configure Device | System Setup | Tray Behavior | Manually Feed Prompt = Unless Loaded
Configure Device | Printing | Manual Feed = Off

The same options are accessible via the web-based printer administration panel.

Click on the Settings tab | Configure Device.
Click on Paper Handling. Set Tray 1 Size to Any Size. Set Tray 1 Type to Any Type. Apply the changes.
Click on Configure Device | System Setup | Tray Behavior, set Manually Feed Prompt to Unless Loaded. Apply the changes.
Click on Configure Device | Printing, set Manual Feed to Off. Apply the changes.

Error messages displayed on the control panel of an HP printer

10.00.00 SUPPLIES MEMORY ERROR
or
10.10.00 SUPPLIES MEMORY ERROR

The printer is unable to read the electronic information (e-label) on the print cartridge so that the printer can keep track of the page count for the print cartridge.

Remove and reseat the toner cartridge. If the problem is not resolved, replace the toner cartridge.

How to toggle the hardware on the HP Elitebook notebook

The wireless and trackpad hardware can be toggled on and off by touching the corresponding lighted button above the keyboard.

The button for the wireless card looks like an antenna and the button for the trackpad looks like a rectangle.

BlackBerry not receiving messages

  1. Confirm that the wireless is turned on by verifying that the device can browse web sites.
  2. Remove and then replace the battery.
  3. Remove any filters: Options | Email Filters.

Sending an email message to the affected user with the string <confirm> in the subject line forces the BlackBerry to send a reply email.
Ex: “<confirm> This is just a test message”.

A PIN message can be sent to the device from the BES. The receipt of the PIN message confirms that the BES and the device are communicating.

Miscellaneous

Various BlackBerry/GroupWise FAQs

Tips for BlackBerry/GroupWise users, like “How to change the way messages are deleted in your GroupWise mailbox when you delete a message from your BlackBerry” and “How to use the Novell GroupWise Address Book with the BlackBerry Address Book” can be found at: http://www.lkdsb.net/InformationTech/E-mail/BlackBerry/blackberry_tips.htm

How to print large scanned images on a single sheet of paper (with MS Paint)

Save the image to the desktop, right-click it and choose Open With | Paint.
Click File | Page Setup, and in the Scaling area choose Fit to 1 by 1 pages.
Change the Orientation if it makes sense to do so.
Click OK, then File | Print.

How to print screenshots to PDF or a physical printer

Here are two ways of getting pretty good printouts of screen captures.

After pasting into Paint, you can adjust the Page Setup before sending the image to the printer. The problem here is that, if you choose to print to PDF, the image will be scaled before it gets to the PDF, so there’s no going back to the original, high-res screenshot from the PDF.

In Paint, Click File | Page Setup, and in the Scaling area choose Fit to 1 by 1 pages.
Change the Orientation if it makes sense to do so.
Click OK, then File | Print.

Optionally, you can zero out your margins and let Paint figure out how to retain the aspect ratio while maximizing the image size. This increases the size of the image on the page.

As an alternative, you can use the Photo Printing Wizard to bypass the Page Setup steps in Paint.

After pasting into Paint, you can save the image as a PNG or other image file to your hard drive, locate the file, right-click and choose Print. This will start the Photo Printing Wizard. (You can batch print images, if you’ve saved them all ahead of time.) Click Next through the Wizard, and choose a printer. The image will be rotated and resized to fit on a single page.

This produces a printed image of nearly the same size as the first method if the margins had been minimized.

What is the difference between PCL and PS printer drivers?

PCL and PS printer drivers use different technologies to scale fonts. The PCL driver may be faster for printing Word documents, and the PostScript driver may produce better looking PDFs.

PCL is HP’s Printer Control Language and is widely used with Windows/DOS/Intel PCs.

PostScript is a language that originated with Adobe and is most popular with Macs/UNIX. PostScript can be used as a general purpose programming language and not just to drive a printer.

Cannot open a .snp file

Open the Snapshot Viewer once, then double-click the .snp file. The Snapshot Viewer can be found at: C:\Program Files\Snapshot Viewer\SNAPVIEW.EXE

Certain laptop models will need Snapshot Viewer installed via ZEN.

How to sync the MacPac database in Citrix

Run the exe at L:\Program Files\The Sackett Group\MacPac\Bin\MPDesktopSyncProcess.exe

If the sync process does not run, try forcing it to run by opening a command prompt and entering L:\Program Files\The Sackett Group\MacPac\Bin\MPDesktopSyncProcess.exe /f.

The mp10 database is located in located in L:\user\macpac10\%username%.

pdfDOCS

A user gets the following error message when trying to open PDFDocs:

PDFDocs – There was an unexpected error in PDFDocs.
Summary: Error: Object reference not set to an instance of an object.

A USERNAME folder must exist in c:\Program Files\pdfDocs\Users. The fix is to copy any other user’s folder, or the SYSTEM folder, and rename it to the current user’s USERNAME.

VZAccess Manager

Connecting to Verizon using the Pantech UML290 cell modem throws the following error:

VZAccess Manager

Device could not establish a connection.
Error WMC604

One reason for this is because the modem had previously been activated, then deactivated, then reactivated. Verizon will have to issue a new SIM card.