Automatic display of open windows when Word starts

Source: Internet
Author: User

When Word starts, it automatically displays open windows, and the first thing you do when you start Word is to perform an open command, why not have Word automatically display the Open dialog box as soon as it starts? This allows you to quickly turn on a few personal resume forms, so that you can easily use VBA (Visual Basic for applications) to enable Word to meet personalized requirements.

Just write a very simple macro, click the menu [Tools]→[macro]→[Macro], and then enter the name of the macro in the Macro Name text box, which must be named "Autoexec."

Click Create, and in the Pop-up VBA code window, the Sub Autoexec () and end Sub rows are entered to complete the following:

Sub Autoexec ()

Dialogs (wdDialogFileOpen). Show

End Sub

When the macro entry completes, click the Save button to save the macro in the Normal template, and then press [ALT+Q] to return to Word, restart Word, and the Open dialog box appears directly when you enter Word.

  Tip: This macro, called "Autoexec," is an Autorun macro that runs automatically when you start Word. The macro action object is the Open dialog box, and VBA names the Word dialog object in the form of "Dialogswddialog-command", for example, the name of the Open command is "FileOpen", and the corresponding dialog box object is named " Dialogswddialogfileopen ". Use the Show method to display an object that "Dialogs" in the preceding code displays the Open dialog box.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.