Insert Header

Top  Previous  Next

 C#   VB.NET   VB6   VBA 

The Insert Header feature allows you to add a header (XML or standard) to the current file or item (class, property, method, etc.) from customizable templates that can use predefined variables (whose value is assigned automatically by MZ-Tools, such as file name, method name, author, etc.) or user-defined variables (whose value is asked when the header is inserted).

MZ-Tools offers the following ways to insert a header:

  • The MZ-Tools | Insert Header menu.
  • The Insert Header button on the MZ-Tools - Main toolbar.
  • In Visual Studio 2015 and higher, the keyboard shortcut associated with the MZTools.InsertCodeElementHeader command.
  • In Visual Studio 2013 and lower, the keyboard shortcut associated with the MZTools8.InsertCodeElementHeader command.
  • In VB6 / VBA, the keyboard shortcut associated with the Insert Header feature.

If you have created more than one header applicable to the current item, a window is shown to allow you to select the header to use (otherwise the only applicable header is inserted directly):

CodeElementHeaderSelection

To add a header to a file, the cursor position must be at line number 1 of the file.

To add a header to any other item kind (subroutine, function, enum, field, UDT, etc.) the cursor position can be:

  • At some line inside the item, if it has a body.
  • At the line of the declaration.
  • At the first line above the declaration, if that line is empty.

You can customize the templates in the Options window, Team Options tab, Headers section.

See Also:

Headers Options

Predefined Variables

User-defined Variables

Keyboard Shortcuts Options