How to Display Word Page Numbers as Words in Farsi
Question details
The user wants to format page numbers as spelled-out Farsi words (e.g., One, Two, Three) in an 80+ page document without experiencing the layout editing slowdowns caused by large nested IF fields.
- Product
- Word
- Device & OS
- not provided
- Scenario
- Formatting long document page numbers into spelled-out Farsi words.
- Observed behavior
- Using large nested IF fields to convert page numbers into Farsi words causes significant performance issues and slows down document layout editing.
Before modifying complex field codes, save a backup of your document and verify the exact field code formatting currently applied to your headers or footers.
Optimize Field Codes with Switches and Macros
Use Word's built-in field switches to change formatting and replace slow nested IF fields with optimized VBA macros.
While Word includes the \* CARDTEXT switch to convert numerals to spelled-out words in English and some other languages, it often lacks built-in support for generating Farsi equivalents natively. Relying on an 80-condition nested IF field for this translation is highly inefficient and causes layout lag.
To fix performance issues, you should optimize your field codes by removing unstable formatting switches and relying on external VBA macros or add-ins (such as those by Graham Mayor) to handle the translation to Farsi text.
Press Alt + F9 on your keyboard to reveal all field codes in the document. Navigate to the header or footer where your page number is located.
Locate the page number field (usually looking like { PAGE \* MERGEFORMAT }). Delete the \* MERGEFORMAT switch entirely, as it is known to cause unpredictable formatting issues and slow down document updates.
Replace the deleted text with the \* CHARFORMAT switch (e.g., { PAGE \* CHARFORMAT }). This switch applies the formatting of the first character of the field code to the entire result, making it much more stable.
Since \* CARDTEXT may not support Farsi, remove your nested IF fields and instead use a dedicated Word macro or add-in designed for Arabic/Farsi numeral-to-text conversion. Run the macro to automatically convert the { PAGE } numeral outputs into Farsi words.
Press Alt + F9 again to hide the field codes. Select your page number, or press Ctrl + A to select everything, and press F9 to update the fields.
Try WPS Office for Seamless Document Editing
If complex field codes and layout slowdowns in Microsoft Word are disrupting your workflow, consider switching to WPS Office. It provides a lightweight, fast, and highly compatible environment for editing long documents without lagging.
- 1. Download and Install: Download WPS Office for free from the official website and install it on your computer.
- 2. Open Your Document: Launch WPS Writer and open your existing .docx file. WPS natively reads and preserves your existing formatting.
- 3. Edit Without Lag: Experience smooth, lag-free scrolling and editing, even with long, heavily formatted documents.

Frequently Asked Questions
Why do nested IF fields slow down my Word document?
Nested IF fields force the word processor to evaluate complex logical conditions every time the document layout changes, pagination updates, or fields refresh. In an 80+ page document, an 80-condition IF statement creates an exponential processing load, resulting in severe typing and scrolling lag.
What is the difference between MERGEFORMAT and CHARFORMAT?
MERGEFORMAT attempts to retain the previous formatting when a field updates, which can be unstable and cause performance issues. CHARFORMAT dictates that the entire field result takes on the exact font formatting of the very first character inside the field code itself, making it much more reliable and faster to process.
Does the CARDTEXT switch work for all languages?
No. The \* CARDTEXT switch converts numbers into spelled-out words (e.g., 1 becomes One), but its language support is tied to Word's built-in proofing tools. It often lacks native support for translating numbers into Farsi words, requiring users to rely on custom macros or add-ins.




