Graphical tutorial on setting the starting page number of a file using VBA in Word

Time: 2022-02-10Source: Huajun Software TutorialAuthor: Xiao Hulu

Still don’t know how to use vba to set the starting page number of the file? In fact, it is very simple to operate in Word. Here I will provide you with a graphic tutorial on how to use VBA to set the starting page number of a file in Word. Friends in need should not miss it.

​ ​ 1. Open word, select a blank document, create a new blank document, or select another template to open for editing.

1.jpg

​ ​ 2. Click View—Click the drop-down arrow of Macro to select View Macro—Enter the macro name: Insert page number—Create.

2.jpg

​​ 3. After clicking Create, you will directly enter the VBA editing page, and the name and prompt information have been edited according to the settings in the previous step. Enter the following code at the flashing cursor:

3.jpg
4.jpg

​ ​ 4. After setting the code, click Save in the VBA editor—then click Run—select: Run Subprocess/UserForm. This will allow you to run the code. After running the code, the page number is automatically set on the WORD editing page.

5.jpg

​ ​ 5. Manage macro locations: Close the VBA editor, click View - Macros - View Macros on the WORD main page - and then select the specific location of the macro in the macro location, such as in the document or template, etc. You can also click Manager to set it up.

6.jpg

​​ 6. Finally, you can click View - Macro - Record Macro - Enter the macro name - Click OK - and then follow the steps on the editing page to insert the page number, so that you can record the code and then modify it slightly.

7.jpg

Come and learn the graphic tutorial on how to use VBA to set the starting page number of a file in Word. It will definitely help everyone.

Related articles更多>>

Popular recommendations