26.25. Microsoft Office

26.25.1. Overview

The Microsoft Office sensor collects information about developer activities from usage of the various applications in Microsoft Office. The sensor represents this data using the Activity sensor data type, documented in Section 25.2, “Activity”. Currently, the most important Activity event recorded by this sensor is the "state change" event, which is used to generate the Active Time abstraction.

This sensor is written in C# and exposed to Microsoft Office applications as a COM add-in via the .NET-COM interop service. This means the sensor requires a .NET runtime. It also uses a Java utility (sensorshell.jar) to communicate with the server and handle offline data storage. This means that Java is also necessary to run the sensor.

It is difficult to implement a sensor that supports all versions of Microsoft Office applications. Table 26.11, “Microsoft Office version support” documents the current support for various versions of the Microsoft Office applications.

Table 26.11. Microsoft Office version support

Application2000XP2003Notes
WordNoYesYesWord 2000 hangs if sensor is enabled. Do not install the Office sensor if you use Word 2000.
ExcelYesYes*Yes* Not yet tested in Office XP, but should work.
PowerpointYesYes*Yes* Not yet tested in Office XP, but should work.
VisioUnknownYes*Yes* Not yet tested in Office XP, but should work. Also not yet tested in Visio 2000, use at own risk.
PublisherUnknownYes*Yes* Not yet tested in Office XP, but should work. Also not yet tested in Publisher 2000, use at own risk.
FrontPageYesYes*Yes* Not yet tested in Office XP, but should work.

26.25.2. Installation

26.25.2.1. Prerequisites

The Office sensor requires .NET Runtime 1.1 and Java 1.5.0 or later.

26.25.2.2. Remove old versions of the sensor (if any)

Use the "Add or Remove Programs" facility in the Windows control panel.

26.25.2.3. Download HackyInstaller and set your Hackystat Host and User Key

Follow the instructions in Chapter 2, Client-side configuration: Tool sensor installation to set your Hackystat host and user key.

26.25.2.4. Configure and install the Office sensor

In the HackyInstaller main window, select the Office sensor and press "Configure Selected Sensor". Figure 26.47, “ Office sensor installer configuration window ” shows what the configuration window should look like after msofficesensor.msi file has been downloaded and installed, the path to the resulting directory is set, and the sensorshell.jar file has been moved to that directory.

Figure 26.47.  Office sensor installer configuration window


Office sensor installer configuration window

This sensor supports the following properties and paths:

  • Enable Office Sensor: This property controls whether the sensor is active or not. If not checked, the sensor will not collect or send data even if installed.

  • Office sensor home directory: This path specifies the directory into which the officesensor.msi program unpacks the Office sensor. After the officesensor.msi program finishes execution, you must manually move sensorshell.jar into the directory it created.

26.25.3. Installation verification

Currently, there is no visual feedback in Office applications indicating that the sensor is working. The only way to monitor sensor operation is to look at the sensor log file.

26.25.3.1. Verify sensor log data

After installing the sensor, bring up an Office application and edit it for a few minutes. Then consult the office.0.log file in the .hackystat/logs directory and confirm that data is being captured and sent to the Hackystat server correctly.

26.25.3.2. List Sensor Data

Next, login to your account on your Hackystat server, and use the "List Sensor Data" command on the Extras page to verify that Activity data for today's date was received by the server for the Office tool.

26.25.4. Installation troubleshooting

26.25.4.1. Troubleshooting general client-server problems

The first step in troubleshooting your sensor installation is to verify that your Hackystat host and key settings are valid and that you can contact the Hackystat server, as described in Section 2.4, “HackyInstaller GUI: Setting and verifying the Hackystat host and user key”

26.25.4.2. Troubleshooting Java availability problems

The sensor might complain that a Java home path is not found. This occurs when the Office sensor cannot find an entry for Java in the Windows registry. To fix this, be sure to use an installer to install the Java JDK, rather than simply unzipping Java files onto your computer.

26.25.4.3. Troubleshooting security level

Microsoft Office applications will not allow the sensor to load when the Macro Security Level is set to High or Very High. If this is the case, click on the "Tools" menu, select "Macro", then "Security". In the "Security" pop-up dialog, go to "Trusted Publishers" pane (or "Trusted Sources" on Office 2000), and check the "Trust all installed add-ins and templates" check box.

26.25.4.4. Troubleshooting new documents

When you are working on a new Office document, the document does not have a file path until you save it. No sensor data will be sent in this case, since the sensor cannot determine the path of the file you are working on.

26.25.4.5. Troubleshooting sensor startup problems

The sensor is enabled only when both of the following conditions are true: (1) The sensor addin is enabled in Office COM Add-In Manager (accessible through Add-in manager from Tools menu). Usually you want to check the startup box as well, so that the sensor starts automatically each time Office starts. (2) The property ENABLE_OFFICE_SENSOR is set to true in sensor.properties. This is to make the sensor behave consistently with other Hackystat sensors.

26.25.4.6. Troubleshooting sensor upgrades and changes

If you have installed the sensor for a subset of supported Office applications, and now you want to add a sensor for another Office application previously not chosen, the only way to do so is to uninstall the sensor and then reinstall it.

26.25.4.7. Office applications take longer to start up

This is normal behavior. Upon startup, the sensor requires both the Java virtual machine and the .NET runtime to start up, which adds time to application startup.

26.25.4.8. Office applications take longer to exit

This is normal behavior. Upon exit, the sensor attempts to contact the Hackystat server to send any final data it has collected. This may take several seconds.

26.25.4.9. Submit a trouble report

If none of the above troubleshooting activities solves your problem, then you should send an email to your Hackystat Administrator to request help. Please include in your email the following information:

  • The output from 'java -version'.

  • The output from 'java -jar sensorshell.jar -verify'.

  • The contents of your sensor.properties file.

  • The contents of your office.0.log file.

  • A description of the problem you are having.

26.25.5. Uninstallation

To disable Office sensor data collection temporarily, invoke HackyInstaller, bring up the Ant Build configuration window, and uncheck the "Enable Ant Build sensor" property, and apply the setting. To permanently uninstall the Ant Build sensor, use the "Add or Remove Programs" facility in the Windows Control Panel.