New File Menu
There are also sections for editing the context menus of folders, files, exes, drives, and My Computer, support for creating custom menu options by clicking the 'List Editor' button (pictured. Use the Properties panel to change the name of the Menu Strip object to mainMenu. Click in the Type Here field at the top of the form and enter &File. This as the effect of creating a menu item object labeled 'File'. The ampersand (&) is added to instruct C# to use the 'F' at the beginning of the file as the accelerator key for this menu item.
A Visual Studio extension for easily adding new files to any project. Simply hit Shift+F2 to create an empty file in the selected folder or in the same folder as the selected file. See the changelog for updates and roadmap. Features
Show the dialogA new button is added to the context menu in Solution Explorer. You can either click that button or use the keybord shortcut Shift+F2. Create foldersCreate additional folders for your file by using forward-slash to specify the structure. For example, by typing scripts/test.js in the dialog, the folder scripts is created if it doesn't exist and the file test.js is then placed into it. ContributeCheck out the contribution guidelines if you want to contribute to this project. For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project. License |
Note
To add a file-creation command to the New submenu, your application's files must have an associated file type. Include a ShellNew subkey under the file name. When the File menu's New command is selected, the Shell adds the file type to the New submenu. The command's display string is the descriptive string that is assigned to the program's ProgID.
Some menu items are not available in all versions of the Visual Basic Editor.
Close
Command | Description |
---|---|
Close & Return to <host application> | Closes the development environment and returns you to the host application. Visual Basic is hidden but remains in memory. |
Close Project | Closes the current project. If the project contains any unsaved changes, you are prompted to save the project before closing. |
Import File, Export File
Adds existing modules and forms to your project, or saves a module or form as a separate file.
Command | Description | Toolbar button | Keyboard shortcut |
---|---|---|---|
Import File | Displays the Import File dialog box, which allows you to add an existing module or form to the project. A copy of the file is added to the project, and the original file is left intact. If you import a form or module with the same name as an existing one, the file is added with a number appended to it. Imported components appear in the Project Explorer window. | CTRL+M | |
Export File | Displays the Export File dialog box so that you can extract the active form or module from the project. The file is copied into an external file. Not available if you have not selected a file in the Project Explorer. | CTRL+E |
File Menu Ms Word
Make Project, New Project, Open Project
Add Item To New Menu
Command | Description | Toolbar button | Keyboard shortcut |
---|---|---|---|
Make <Project> | Opens the Make Project dialog box so that you can build your project into a DLL. | ||
New Project | Displays the New Project dialog box where you choose the type of project that you want to create. If there is currently another project open when you create a new project, you will be prompted to save your work. Available only at design time. | ||
Open Project | Closes the current project or group project, if one is loaded, and opens an existing project or group of projects. You can open as many projects as your system resources permit. | CTRL+O |
Command | Description | Toolbar button | Keyboard shortcut |
---|---|---|---|
Prints forms and code to the printer specified in the Microsoft Windows Control Panel. See also the Print, Print Setup dialog boxes. | CTRL+P |
Remove Item
Command | Description |
---|---|
Remove <Item> | Permanently deletes the active form or module from the project. Not available when an item is not selected in the Project Explorer. When removing a module from a project, make sure the remaining code doesn't refer to the removed item. Before your item is deleted, you are asked if you want to export it as a file. If you click Yes in the message box, the Export File dialog box opens. If you click No, the item is deleted. IMPORTANT: You cannot undo this action. |
Save Host Document
Command | Description | Toolbar button | Keyboard shortcut |
---|---|---|---|
Save <host document> | Saves the current project and all of its components (forms and modules) with your document. A standalone project is saved separately as a project file with a .vba extension. The Save command displays the Save As dialog box if this is the first time the project is being saved. | CTRL+S |
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.