Home >Software Tutorial >Office Software >Detailed operation method of hiding the content of Word document using macro in word

Detailed operation method of hiding the content of Word document using macro in word

WBOY
WBOYforward
2024-04-26 11:55:201185browse

Want to hide content in a Word document but don’t know how? Don't worry, PHP editor Apple will bring you detailed operation methods. This article will guide you step by step to use macro functions to easily hide sensitive information in documents. Through the power of macros, you can ensure your confidential data is protected from unauthorized access. Continue reading below to learn how to use macros to effectively hide the content of a Word document.

First step: Start word, execute the "Tools → Macro → Record new macro..." command, open the "Record Macro" window, and name the new recorded macro in the "Macro Name" column Hidden, select the "All Documents (Normal.dot)" option in the "Save macro in" drop-down box. In the "Assign macro to" tool box, click the "Keyboard" button to open the "Customize Keyboard" window. Position the cursor in the "Please press the new shortcut key" text box. At this time, perform keyboard operations and press Alt Ctrl H key combination, this shortcut key combination will appear in the "Please press the new shortcut key" text box, click the "Assign" button in the window to assign the shortcut key to the Hidden macro, and finally click the "Close" button to enter macro recording state. As shown in the picture.

Detailed operation method of hiding the content of Word document using macro in word

Step 2: Execute the "Edit→Select All" menu command to select all text. Then execute the "Format → Font" menu command to open the "Font" settings dialog box. In the "Font" tab, select the "Hide Text" option in the "Effect" radio button and click the "OK" button, as shown in the figure . Return and click the "Save" button on the toolbar. Click "Stop Recording" to end the recording of Hidden macros.

Detailed operation method of hiding the content of Word document using macro in word

Step 3: Record the Show macro, also select the "Record New Macro" option, name the macro Show, and select "All Documents" in the "Save Macro in" drop-down box ( NormaJ.dot)" option, specify the shortcut key for the Show macro as Alt Ctrl S (the operation method is the same as specifying the shortcut key for the Hidden macro).

Step 4: After entering the macro recording state, execute the "Edit→Select All" menu command, and then execute the "Format→Font" menu command. If there is a "√" in the "Hidden Text" radio button in the "Font" tab, click to remove the "√" so that the option is not selected, and then click the "OK" button. Click "Stop Recording" to end the recording of Show macro.

Step 5: Execute the "Tools → Macro → Macro..." menu command, find Hidden macro and Show macro in the "Macro" window, select Hidden macro or Show macro respectively, and then click the "Macro" window Click the "Edit" button on the right. At this time, the Visual Basic editor in word 2000 is opened, and the code for the Hidden macro and Show macro appears in the editor's code window. Modify the Hidden macro and Show macro codes, delete the font, font size and other attributes, and keep only the Hidden (hidden) attribute, as shown in Figure 3; after the modification is completed, click the "File → Save Normal" command on the editor menu bar , and finally get the code for the Hidden macro and Show macro.

Detailed operation method of hiding the content of Word document using macro in word

Let’s try it out. Open an edited word, press the Alt Ctrl H key combination, and run the Hidden macro. At this time, the document will automatically save after hiding the content, and finally close the document. When others open the document again, surprise! The document is empty, I can’t see any content, I’m totally confused!

To display the document content, just press the Alt Ctrl S key combination. Just know this secret and don’t reveal it! Using shortcut keys to run Hidden macros and Show macros is not only easy to operate, but also improves the confidentiality of this method. You can hide and show them as you like. This method is effective for documents containing tables, pictures, text boxes, hyperlinks and other attribute formats.

The above is the detailed content of Detailed operation method of hiding the content of Word document using macro in word. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:zol.com.cn. If there is any infringement, please contact admin@php.cn delete