Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development

  • Print
  • + Share This
  • 💬 Discuss
This chapter is from the book

This chapter is from the book

Calling a Macro from Within a Macro

Because you can call a macro from within another macro, you can build some complex macro functionality to save a lot of typing. This part of the project shows you how to call one macro from another.

  1. If it isn't already open, launch the MarkupSource.macro file.

  2. Create a few email macros. You can type these in manually or copy them from the file named Project1.macro on the CD.

    • JOE &joesmith@bizdev.com&

    • TOM &tomjohnson@bizdev.com&

    • DOT &dorothy@bizdev.com&

    Figure 1.9 Adding a bunch of email macros for different individuals.

  3. Create another macro to call one of these macros.

    • type MAILTOM &<a href="mailto: $TOM$">%$TOM$%</a>&

    • the dollar sign delimiter signals a call to another macro, in this case the "TOM" macro you created in step 2. The "%" sign delimiter once again highlights the contents of the TOM macro.

    Figure 1.10 Calling an existing macro from within another macro.

  4. Save the macro file.

  5. Type MAILTOM and press the macro command keys in the HTML Source editor to automatically input the macro text.

  6. Figure 1.11 Output from the MAILTOM macro.

  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus