TITLE: Printing a Shaded Address on an Envelope PRODUCT: Ami Pro 2.0 DATE: 31-Oct-1991 PROBLEM: How can address lines from a letter be easily printed on an envelope? SOLUTION: A quick way to get a simple macro that will copy shaded text (or allow you to shade text) to an envelope style sheet and print it is to use the example in the macro documentation. If the on-screen macro documentation has been installed, you can actually copy the example from the help text and paste it into Ami Pro. If the on-screen documentation has not been installed, just type in the macro in an untitled window and save it to a file name with an extension of .SMM. NOTE: A macro named ENVELOPE.SMM was shipped with Ami Pro releas 1.2. This macro printed shaded lines on an envelope. Due to the many changes and enhancements in the Ami Pro release 2.0 program and macro language, certain commands in the ENVELOPE.SMM macro have changed and many of the commands used in this macro are no longer necessary. Rather than modifying ENVELOPE.SMM to be compatible with Ami Pro release 2.0, follow the steps below to create a new macro. CREATING AN ENVELOPE MACRO FROM THE MACRO DOCUMENTATION EXAMPLE 1. In Ami Pro choose Help / Macro Doc. 2. Select Macro Functions F - G. 3. Choose FilePrint from the list of functions. 4. Choose Edit / Copy. 5. Press ALT + F4 to close the macro documentation. 6. In an untitled window, choose Edit / Paste. 7. Delete all of the lines except the following: FUNCTION Example() WHILE CurShade$() = "" UserControl("Select the text to print and click on Resume...") WEND Copy() New("~ENVELOP.STY", 1, 0) Paste() FilePrint(1, 1, 9999, 1537) FileChanged(1, 0) FileClose() END FUNCTION 8. Choose File / Save. 9. Select Ami Pro Macro as the File Type. 10. Specify the desired name for the macro with an extension of .SMM (ENV.SMM, for example). 11. Choose OK. 12. Choose File / Close to close the macro file. HOW TO CREATE THE ENVELOPE MACRO IF MACRO DOCUMENTATION IS NOT INSTALLED 1. In an untitled window, type the macro commands listed in Step 7 above. Make sure that each command is on a separate line just as the above example. 2. Choose File / Save. 3. Select Ami Pro Macro as the File Type. 4. Specify the desired name for the macro with an extension of .SMM (ENV.SMM, for example). 5. Choose OK. 6. Choose File / Close to close the macro file. NOTE: The style sheet name in the line that reads New("~ENVELOP.STY", 1, 0) can be changed to another style sheet name if another style sheet is being used to print envelopes. HOW TO USE THE ENVELOPE MACRO 1. Make the printer that will print the envelope the default Windows printer in the Printers section of the Windows Control Panel (can be accessed in Ami Pro by pressing ALT + SPACEBAR to open the Control menu, then choose Control Panel). 2. In the Control Panel Printers menu, choose Configure / Setup and specify the appropriate paper source option for the envelope and landscape orientation if the printer requires this for printing envelopes. 3. Choose OK from the each of the three printer dialog boxes to return to the main Control Panel. 4. Press ALT + F4 to close the Control Panel. 5. In Ami Pro open the document containing the lines of text that will print on the envelope. 6. To run the macro, choose Tools / Macros / Playback, then select the macro name and choose OK. 7. If any lines are currently shaded, those lines will be copied to an untitled window using the style sheet specified in the macro. If no lines are shaded, a Macro Pause dialog box will appear. Shade the desired lines, then choose RESUME. NOTE: A mouse is required to access Resume in the Macro Pause dialog box. If you are not using a mouse, it will be necessary to have the text shaded before running the macro. 8. After the envelope is printed, the untitled window closes.