How to Show English or Italian Text in a Word Document Using VBA
Question details
The user wants to toggle the visibility of English and Italian text in a multilingual Word document for reading and printing.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Managing a bilingual document where only one language (either English or Italian) should be visible and printable at a time.
- Observed behavior
- Both languages are currently displayed together, requiring an automated method to selectively hide one language and show the other, or to show both.
Ensure your document is properly formatted using distinct paragraph styles for each language, and verify that the Developer tab is enabled in your ribbon to access the VBA editor.
Use a VBA Macro to Toggle Paragraph Styles
Create specific language styles and use a VBA macro to automatically hide or show them based on your current reading or printing needs.
This method relies on Word's ability to hide text based on paragraph styles. By creating matching style levels for English and Italian, a short VBA script can loop through them and toggle their hidden property.
Open the Styles pane and create custom paragraph styles named 'Text1English' through 'Text9English' and 'Text1Italian' through 'Text9Italian'. Apply these styles to the respective paragraphs in your document.
Press Alt + F11 to open the Visual Basic for Applications (VBA) editor. Click Insert > Module to create a new blank module.
Paste the 'SwitchLanguages' macro code provided in the solution to toggle the hidden font status. Also, paste the 'ShowBoth' macro to unhide all styles when you want to view the original bilingual document.
Close the VBA editor. Go to the Developer tab, click Macros, select 'SwitchLanguages', and click Run. The document will immediately hide one language and display the other.

Use Word IF Fields and Document Properties
Use dynamic field codes to display text conditionally based on a custom document property, avoiding VBA entirely.
Manage Multilingual Documents Seamlessly in WPS Writer
WPS Writer offers an intuitive interface for managing custom paragraph styles and formatting, making it effortless to organize and control the visibility of bilingual document content. Its robust feature set also fully supports standard VBA macros for automation.
- 1. Open your Document: Launch WPS Writer and open your bilingual document.
- 2. Manage Paragraph Styles: Use the Styles pane (Home tab > Styles) to easily create and apply your dedicated English and Italian text styles.
- 3. Run VBA Macros: Navigate to the Developer tab to insert and run your VBA toggle macros natively, instantly switching your document's visible language.

Frequently Asked Questions
Can I adapt the macro to support more than two languages?
Yes. You can create additional styles (e.g., 'Text1French') and modify the VBA IF/ELSE logic to cycle through three or more languages by setting the .Font.Hidden property accordingly.
Why is the hidden text still printing on my document?
Word has a specific print setting for hidden text. To fix this, go to File > Options > Display, and ensure that the 'Print hidden text' checkbox is unchecked under the Printing options section.
What happens if I forget to create one of the numbered styles?
If the macro loops through a style name that doesn't exist (like 'Text4English'), it will throw a 'Style not found' error. Always ensure your VBA loop limit matches the exact number of custom styles you have created.
Does this method delete the hidden text?
No, the text is completely safe. The macro only changes the 'Hidden' font attribute of the paragraph style. Running the 'ShowBoth' macro will immediately make all text visible again.




