FrontPage 2003 supports Visual Basic
for Applications. This means you can write powerful macros
that automate your web page editing. I've written a
FrontPage VBA macro that applies syntax highlighting to
Active Server Pages scripts. You can import my macro by
selecting "Tools" from the FrontPage 2003 menu.
Select the "Macro" menu option and then select
"Visual Basic Editor".

Once you are in the Visual
Basic Editor, select the "File" menu. Select the
"Import File" menu option and then browse to the
HighLight.bas VBA module on your hard drive.


You can run the
macro by selecting the "Tools" menu,
"Macros" menu option, highlight the doHighLight
procedure, and click the RUN button.
If you would like to associate a
toolbar button with this macro, right click on an empty area
of the toolbar and select the "Customize..." menu
option. Click the "Commands" dialog box tab and
scroll down the categories to find "Macros" which
you'll then select.

Drag the "Custom Button"
(smiley face) to the toolbar. Right click on the smiley face
and select the "Assign macro..." menu option.
  You
can also change the icon for your custom button.

To use this macro, your ASP code
should be pasted between <code><pre> ASP script
</pre></code> HTML tags. I prefer to enclose my
scripts between <pre> tags to preserve my formatting
but for some reason this caused a problem where the string
could not exceed 255 characters. To get around this problem,
I had to edit the inner HTML of the <code> tag
instead. You can remove the <code> tags after running
the macro. The macro only does syntax highlighting for the
first block of <code> tags. It will highlight ASP
syntax using similar colors as the Visual InterDev code
editor, except VBScript constants will be highlighted
in red. The macro does not do a perfect job so you may want
to edit the few mistakes it will make. This macro will help
you to document your ASP scripts as web pages. It can also
be used to apply syntax highlighting to VBScript.
Download
the ASP syntax highlighting FrontPage 2000 VBA module
|