Although applications may share a common macro language, each has its own structure and way of operating. Macros written for one type of application usually do not work in another. Manipulating a document in Word is completely different than moving around in an Excel workbook. Even similar events, such as adding together the numbers from two cells, bears little resemblance to each other behind the scenes. To understand macro viruses, you must understand how each application uses macros.
Although macros in Word can be saved in a
document, they are more often stored in a separate file type called a
(prior to Word 97, macros had to
be stored in a template). The template can contain many of the
settings a user wants to include in her default document, like font
type, toolbar settings, key assignments, styles, font size, page
layout, etc. Every Word document is based on a template, and that
template is linked to the document. Whenever an existing or new
document is opened, the template settings are applied first. A
, usually called
is in memory every time Word is loaded. This is a favorite of virus
writers, because a macro placed there is able to infect more quickly.
When you choose
to start a new document, Word will prompt you to choose one of your
available templates to use. The
template is based on
Word comes with dozens of predefined templates for form letters, ...