uh-reference-checker-addin

UH Reference Checker — Word Office Add-in

A Microsoft Word add-in that checks academic references against the University of Hertfordshire School of Health and Social Work Referencing Guidelines 2020–21 (APA 7th), with one-click in-place fixes that preserve italics and hanging indents.

This is the Word integration of the existing uh-reference-formatter.html standalone tool. The same engine (60+ auto-fix rules, 225 unit/integration tests) powers both.


What it does

The engine handles, among others:


Installation

Quickest path — Windows installer (Word desktop)

  1. Download install.bat.
  2. Right-click → Run as administrator.
  3. When prompted, accept the UAC elevation.
  4. Close and reopen Word.
  5. Insert → Add-ins → More Add-ins → SHARED FOLDER tab → pick UH Reference CheckerAdd.

The installer creates a tiny SMB share at \\YOUR-PC\UHReferenceCheckerAddin containing only manifest.xml, registers it as a Trusted Catalog under HKCU\Software\Microsoft\Office\16.0\WEF\TrustedCatalogs, and downloads the manifest from this GitHub Pages site. To remove everything later: download uninstall.ps1 and run it from an elevated PowerShell.

Word for the web (no install needed)

  1. Open https://word.cloud.microsoft and any document.
  2. Insert → Add-ins → Upload My Add-in → select manifest.xml.

Hosting your own copy

Word add-ins need to be hosted on an HTTPS URL for Word to load them. This add-in is already hosted at https://codescribler.github.io/uh-reference-checker-addin/ — but if you want to fork and host your own:

Step 1 — Publish to GitHub Pages

  1. Create a new GitHub repository (e.g. uh-reference-checker-addin). Make it public.
  2. Upload every file in this folder to the repo root. Don’t put them inside a subfolder.
  3. In the repo settings, go to Pages and turn it on for the main branch (root).
  4. Wait ~30 seconds. Your add-in is now hosted at:
    https://YOUR_USERNAME.github.io/uh-reference-checker-addin
    

Step 2 — Edit the manifest

Open manifest.xml in a text editor and replace every occurrence of {HOST_URL} with the URL from step 1.

There are 6 placeholders to update — SourceLocation, IconUrl, HighResolutionIconUrl, SupportUrl, plus the three bt:Url resources. A quick search-and-replace catches them all.

Then commit and push the edited manifest back to your repo.

Step 3 — Sideload into Word

Word on Windows / Mac (desktop)

  1. Save a copy of manifest.xml to your local disk.
  2. Open Word with any document.
  3. Go to Insert → Add-ins → My Add-ins → Manage My Add-ins (or Upload My Add-in in some versions).
  4. Click Upload My Add-in and select your local manifest.xml.
  5. The Check References button now appears on the Home tab in the References group.

Word for the web

  1. Open Word at office.com.
  2. Open a document.
  3. Insert → Add-ins → Upload My Add-in → select manifest.xml.

Word on iPad / Office on phone

Sideloading requires a Microsoft 365 tenant’s centralised deployment. The desktop instructions above are the easiest path for personal use.


How to use

  1. Open your Word document.
  2. Either:
    • Highlight the reference list (recommended), then click Check References in the ribbon, then click Check selected paragraphs in the task pane.
    • Or just click Check ReferencesScan whole document — the add-in will look for a References / Bibliography heading and check the paragraphs that follow.
  3. Review each card. The original is shown with errors highlighted; the fixed preview shows what will be applied.
  4. Click Apply fix in document on any card to rewrite that paragraph in place, or Apply all fixes to do them all at once.
  5. Important: Word doesn’t have a single “undo all” for add-in changes, so review carefully or apply one at a time. Ctrl+Z does undo a single fix.

Local development (optional)

If you’d rather host the add-in on localhost instead of GitHub Pages, you’ll need:

This will install a trusted local certificate, start an HTTPS server on https://localhost:3000, sideload the manifest, and open Word with the add-in already loaded. Edit manifest.xml’s {HOST_URL} to https://localhost:3000 first.


File layout

uh-reference-checker-addin/
├── manifest.xml          ← describes the add-in (edit {HOST_URL})
├── taskpane.html         ← UI shown in the task pane
├── taskpane.css          ← styling
├── taskpane.js           ← Office.js integration: read/apply paragraphs
├── engine.js             ← shared rules engine (60+ auto-fix rules)
├── commands.html         ← placeholder required by the manifest
├── assets/
│   ├── icon-16.png
│   ├── icon-32.png
│   └── icon-80.png
├── extract-engine.py     ← regenerates engine.js from the standalone HTML
├── make-icons.py         ← regenerates the icon PNGs
└── README.md

Keeping engine.js in sync with the standalone HTML

engine.js is auto-extracted from the standalone uh-reference-formatter.html tool’s <script> block. If you edit the engine in the HTML and want the changes reflected here:

python extract-engine.py

The 225 existing unit/integration tests can then be re-run against the new engine.js:

node engine-tests.js   # runs all 6 suites

(See engine-tests.js for how this works — it stubs fs.readFileSync so the existing test files pick up engine.js instead of the HTML.)


Permissions

The manifest requests ReadWriteDocument — the add-in needs to read paragraph contents (to check) and replace them (to fix). It does not access anything outside the current document, does not contact any external server (other than the static files it loads from your hosting URL), and stores no data.


Troubleshooting

Symptom Likely cause Fix
“Could not start the add-in” Manifest’s {HOST_URL} placeholders not replaced Edit manifest.xml and replace all 6 {HOST_URL} occurrences
Ribbon button missing Add-in installed but in a different tab Look on Home tab, References group
Task pane shows “blocked content” Browser/Office can’t reach the host URL Verify GitHub Pages is live by opening https://your.url/taskpane.html directly
“No reference paragraphs were found” on whole-document scan No “References” heading detected Highlight the list manually and use Check selected paragraphs
Fix applied but italics lost on some paragraph The paragraph used unusual Word formatting (e.g. character styles) Verify the original — the heuristic falls back to plain text for paragraphs it can’t parse

Licence and provenance

Built for personal use by the document’s author. The HSK referencing guidelines are © University of Hertfordshire and are not redistributed by this tool — only their rules are encoded in the engine.