How to Preserve Formatting in Word Macro Fill-In Fields
Question details
The user needs a reliable method to keep document layouts intact and perfectly aligned when data is inserted into macro fill-in fields.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Setting up a document template that requires specific positioning for sender, addressee, and reference information.
- Observed behavior
- To maintain a consistent alignment of layout elements on the left and right sides regardless of the text length entered into the form fields.
Before starting, ensure your document margins are finalized and enable the Developer tab in your ribbon to easily access form fields and content control options.
Use a Borderless Table to Align Fill-In Fields
The most effective way to prevent text from shifting when using fill-in fields is to contain them within an invisible borderless table.
Tables act as strict structural boundaries. By placing your left-aligned content (like Addressee and Our Ref) in one column and right-aligned content (like Sender and Your Ref) in another, the layout will never break, even if the fill-in data is exceptionally long.
Navigate to the Insert tab, click Table, and select a 2-column or 3-column grid depending on how you want to space your sender and addressee details.
Type your static text and insert your macro fill-in fields into the corresponding table cells. Place left-aligned items in the left column and right-aligned items in the right column.
Select the entire table. Go to the Table Design tab, click the Borders dropdown menu, and select 'No Border' to make the grid invisible when printed.
Go to File > Save As, and choose Word Template (.dotx) as the file format so your structural layout can be reused without being overwritten.

Use Content Controls Instead of Legacy Fields
Replace legacy fill-in fields with modern Content Controls for better stability and formatting lock.
Easily Align Forms and Templates in WPS Writer
WPS Writer offers intuitive table formatting and document controls, allowing you to create perfectly aligned professional templates with ease. You can build borderless layouts quickly without struggling with complex macro setups.
- 1. Open WPS Writer: Launch WPS Office and create a new blank document, or open your existing letter draft.
- 2. Insert a formatting table: Navigate to the Insert tab, select Table, and insert a 2-column layout to organize your sender and addressee sections.
- 3. Add details and hide borders: Input your form details into the cells. Select the table, go to the Table Tools tab, click Borders, and select 'No Border'.
- 4. Save as a template: Click Menu > Save As, and choose either the WPS Template (.wpt) or Microsoft Word Template (.dotx) format.

Frequently Asked Questions
Why does my text shift and misalign when I type in a regular Word fill-in field?
If you rely on spaces or tabs to separate left and right content, inserting text pushes the trailing spaces further to the right. A borderless table prevents this because the text wraps within a fixed cell structure, completely protecting the adjacent layout.
Can I use macro fill-in fields on a Mac?
Yes, legacy macro fill-in fields generally function on Mac versions of Word. However, creating modern Content Controls is primarily supported on Windows. Using a borderless table is universally compatible across Windows, Mac, and alternative software like WPS Office.
How do I hide table lines but still see them while I am creating the template?
After setting the table borders to 'No Border', go to the Table Layout tab and click 'View Gridlines'. This displays faint dashed lines to guide you during the editing process, but they will not appear when the document is printed or exported to PDF.




