The easiest way to write a macro is to first record a macro using the Macro>Record menu command, and then to modify the macro using the Macro>Edit menu command. Or you can use Notepad or any text editor to edit a macro file. All macro files must have the .zmc file extension.
The structure of the macro file is very simple. The PASSPORT macro must contain a subroutine called ZMain.
Macro Skeleton Structure:
Sub ZMain()
Dim Text, ret
.
.
End Sub
Note: The Dim Text, ret statement declares two variables that are used in the macro by commands that PASSPORT may record. This statement does not have to be included in your macro if you do not use either of those macro variables.