How to write Macros in FrontPage ??

  • Thread starter Thread starter lifeson
  • Start date Start date
L

lifeson

I have never known much about Visual Basic. But I was always able to
work around that limitation with Excel and Word byt simply "recording"
my macros. I even wrote some complex macros by recording several
actions and then editing the code - that I could do. But writing code
from the ground up I can not.

For some odd reason, Microsoft left out the Record Macro feature with
FrontPage. I am puzzled as to why they did that? So I am limited to
finding "other people's" macros.

Right now, I have a need for a Macro to place a border around a
paragraph and then indent it a couple of times. I do this often on my
pages to denote an important concept. There are a couple other macros
I want to write as well, such as changing the Font to 18-point Times
New Roman, which is my favorite look for my headers.

Is my only option to learn Visual Basic code for FrontPage? Or is
there a 3rd party macro recorder utility out there somewhere?
 
For what you want you don't want to use macros on the web. What you need is
to use CSS to format your text. You do that by creating a custom class. This
is sort of like using Styles in Word. Put all the styles in one stylesheet
and link all your pages to it. Your CSS would look something like:

..header18 {
font: 18pt "Times New Roman", Times, serif;
}
p.bordered {
border: thin solid black;
padding: 10px;
}

Save the above on a totally blank page and name it something.css.

To use it in FrontPage 2002 use Format -Stylesheet Links and browse to your
stylesheet. Another option is to use Jimco's Style Sheet Linker
(http://jimcoaddins.com/addins.aspx bottom on page, keep scrolling).

After that your custom classes will be available in the dropdown box on the
left of the format toolbar (where it says Normal). Highlight what you want
to apply the custom class to and scroll though the dropdown till you see the
custom class and select the class. In code view it would look like:

<h1 class="header18">This is an 18pt header.</h1>
<p> This is a normal paragraph.</p>
<p class="bordered">This class would have a border and 10px of white space
around the paragraph. You can change the width of the border by replacing
thin with medium, thick or a px measurement, you can even replace solid with
other styles but not all browsers support other types of lines. While black
can be changed to another color either by name or hex code.</p>

There is a built-in styles editor in FrontPage from the format menu but I
prefer to use TopStyle Lite (freeware) or Pro available at
http://www.bradsoft.com/download/index.asp Instructions for using as the
default CSS editor with FrontPage are available at
http://www.bradsoft.com/topstyle/thirdparty/frontpage.asp (it refers to
FrontPage 2000 but FrontPage 2002 works the same.)

I strongly recommend using CSS for formatting your page. Works cross browser
and lets you keep a consistent look and feel across your whole site. Added
benefit is if you change the style in your stylesheet, say you decide that
all you 18pt headers should be red by changing the color in the stylesheet
you change every header that uses header18 on your entire site at one time.
 
Back
Top