Create a macro
When you create a new macro, you launch the Microsoft Visual Basic Editor to write your Visual Basic for Applications (VBA) macro code.
You cannot "record" a macro in Microsoft Expression Web, but the Help in the Visual Basic Editor has sample code that you can copy and paste into your macros to automate common tasks.
To create a new macro
On the Tools menu, point to Macro, and then click Macros.
In the Macro name box, type a name for the macro, and then click Create. Macro names cannot contain spaces or punctuation marks, but you can use underscores. For example, you can use Macro1 or Macro_1, but not Macro 1.
In the Visual Basic Editor, type or copy your code into the module window.
If you want to run the macro from the module window, press F5.
When you finish creating your macro, on the File menu, click Close and Return to Microsoft Expression Web.
You can get information about macro creation and debugging, as well as information about the Expression Web object model, in the Visual Basic Editor help.
To get Visual Basic Editor help
On the Help menu in the Visual Basic Editor, click Visual Basic Help.