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
| Application | 2000 | XP | 2003 | Notes |
|---|---|---|---|---|
| Word | No | Yes | Yes | Word 2000 hangs if sensor is enabled. Do not install the Office sensor if you use Word 2000. |
| Excel | Yes | Yes* | Yes | * Not yet tested in Office XP, but should work. |
| Powerpoint | Yes | Yes* | Yes | * Not yet tested in Office XP, but should work. |
| Visio | Unknown | Yes* | Yes | * Not yet tested in Office XP, but should work. Also not yet tested in Visio 2000, use at own risk. |
| Publisher | Unknown | Yes* | Yes | * Not yet tested in Office XP, but should work. Also not yet tested in Publisher 2000, use at own risk. |
| FrontPage | Yes | Yes* | Yes | * Not yet tested in Office XP, but should work. |
The Office sensor requires .NET Runtime 1.1 and Java 1.5.0 or later.
Use the "Add or Remove Programs" facility in the Windows control panel.
Follow the instructions in Chapter 2, Client-side configuration: Tool sensor installation to set your Hackystat host and user key.
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.
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.
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.
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.
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”
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.
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.
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.
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.
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.
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.
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.
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.
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.