MyMacros Property Pages Dialog Box

You use the MyMacros Property Pages dialog box to specify global settings for your project. These settings act as defaults, controlling the appearance and behavior of the items in your project throughout its existence. A project's property pages are available only when the project is selected in Project Explorer.

You can access the MyMacros Property Pages by selecting MyMacros in the Project Explorer and then choosing Property Pages on the View menu, or by pressing SHIFT+F4.

The dialog box contains three pages: General, Build, and Imports. You can select a page by selecting its name on the left pane.

General Page

Allows you to manipulate general settings for the project, such as its name and root namespace. It contains the following options:

Project name

Contains the name of the project currently selected in the Macro Explorer. If multiple projects are selected, contains an empty string.

Root namespace

Sets the base namespace for all files in the project. Contains the project name if you have not added a different value to the field. If multiple projects are selected, contains an empty string.

Optimization

When checked, the Remove integer overflow checks option turns off overflow error checking for integer operations. It is unchecked by default.

Build Page

Allows you to set the project defaults for compilation, such as which compiler options to turn on by default. It contains the following options:

Generate debugging information

When checked, causes debugging information to be generated at compile time. It is checked by default.

Option Strict On by default

Sets the compiler default to require explicit narrowing conversions, and to disallow late binding. It is unchecked by default.

Option Explicit On by default

Sets the compiler default to require explicit declaration of variables. It is checked by default.

Option Compare Binary by default

Sets the compiler default for string comparisons: binary (case-sensitive) or text (case-insensitive). It is checked by default.

Enable build warnings

Causes build warnings to display during compilation. It is checked by default.

Treat warnings as errors

Causes build warnings to be logged as errors during compilation; available only if Enable build warnings is checked. It is unchecked by default.

Define DEBUG constant

Defines the DEBUG constant, which is used in conditional compilation. When DEBUG is defined, Debug class methods generate output to the Output window. When it is not defined, Debug class methods are not compiled and no Debug output is generated.

Define TRACE constant

Defines the TRACE constant, which is used in conditional compilation. When TRACE is defined, Trace class methods generate output to the Output window. When it is not defined, Trace class methods are not compiled and no Trace output is generated.

Custom constants

Allows you to define custom constants to be used in conditional compilation.

Imports Page

Allows you to specify the namespaces to import for the project. The imports you specify are passed directly to the compiler, and apply to all the files in your project. Importing a namespace allows you to use its elements in your code without fully qualifying them. The Imports tab contains the following options:

Namespace

Allows you to specify the namespace to add to the project.

Add Import

Adds the specified namespace to the project.

Update

Replaces the namespace highlighted in Project Imports with the one specified in Namespace.

Project imports

Lists all namespaces referenced by the project.

Remove

Removes the currently selected namespace from Project Imports.

Note

If multiple projects are selected in the Macro Explorer, the Project Property Pages dialog box is displayed with all properties disabled.

See Also

Tasks

How to: Run Macros

Concepts

Debugging Macros

Saving and Exporting Macros Files

Other Resources

Conditional Compilation