Thai Documentation Utility

Thai Numeral Converter

A Microsoft Word add-in that permanently converts Arabic numerals to real Unicode Thai numerals in official documents — replacing a font trick that doesn't work on Mac and quietly corrupts documents when it doesn't.

Result
Official Thai government form templates convert to real Thai numerals in one click in Word for Mac — formatting, emails and URLs left intact, no special font needed.
My role
Product owner: problem, conversion rules, test cases, install guides. Code AI-assisted.
Word Add-in Utility Localization
IT๙ Converter v1.23.2 task pane in Word for Mac, beside an official memo template whose numbers have been converted to Thai numerals

Problem

Thai official documents must use Thai numerals, but many templates rely on a font called "TH Sarabun IT๙" — a Sarabun variant where Thai-numeral glyphs are simply mapped onto the ordinary digit keys, so typing "1" displays "๑" without any real underlying change to the text. That font doesn't install or render on Mac, and even on Windows, staff switch inconsistently between plain "TH Sarabun New" and "TH Sarabun IT๙" while editing the same file — so one document ends up with some digits as real Thai numerals and others as plain Arabic numerals wearing a font trick, mixed within the same word or field.

Approach

Rather than another font hack, the add-in performs a real, permanent Unicode substitution directly inside the live Word document, editing text in place so bold, italic, and color formatting all survive the conversion. A "Smart Ignore" mode is on by default: digit runs touching a Latin letter — email addresses, URLs, anything glued to English text — are skipped, while free-standing numerals elsewhere convert normally.

A "Deep Search & Flatten" mode extends conversion into headers, footers, page-number fields, and auto-numbered lists. Auto-numbered lists are frozen into Thai-numeral text — the same job an earlier VBA macro handled before this became a proper Word add-in. For page numbers it first applies Word's own Thai-numeral field format, which keeps them counting, and flattens them to text only if Word refuses.

Outcome

A working add-in, sideloaded via a downloadable manifest with separate install paths documented for Mac and Windows — itself a workaround for the original Mac font-install failure that started the whole project.

Version 1.23 (October 2026) replaced silent failure with reporting. Earlier versions swallowed every error and always said "done". Once errors were shown, every official form template raised warnings; an in-pane diagnostics button traced them to the Garuda emblem picture, which the add-in was searching for text it doesn't have. The text itself had been converting correctly. Version 1.23.2 skips pictures, and the templates now convert cleanly in Word for Mac. The same review found the published manifest still pointing at the pre-rename GitHub address, which had stopped resolving, and moved it to vitchakorn.com. The install site gained an in-browser preview of the conversion rules and step-by-step guides for each platform.

The full conversion runs inside Word as a task-pane add-in. The link above previews the conversion rules in the browser and walks through installing it.

Tech Stack

React 19 + TypeScript Vite Office.js (Word JavaScript API) Fluent UI GitHub Pages