N¬™ë,j°jËkj{zºÞw­…«k‰©oz»"¢z
‰¦ºx†jטúèFor everyone who misses automatic envelope creation, I have a working
solution.

First create a new document.
Change the Page Setup to be '#10 Envelope' or whatever you envelope style
as listed is and select the correct orientation for your printer.
Set the margins as follows (for #10 Envelope)
    inner - 3.5in
    outer - 2.0in
    top - 1.65in
    bottom - 0.95in

    Note: I left the default headers/footer alone at 0.5in
Save this document as "envelope.rtf" in the "~/Documents/Nisus Documents"
folder.
From the Finder, do a Get Info on "envelope.rft" and check 'Stationary Pad'

I create the envelope by calling an AppleScript from the macro menu that,
in turn, calls a second AppleScript. Don't ask why it doesn't work from a
single script -- it doesn't.

Here's the first script.

<applescript>
tell application "Finder"
        set scriptPath to (((path to application support from user domain) as
string) & "Nisus Writer:Macros:Envelope Maker.app") as alias
        open scriptPath
end tell
</applescript>

Save this as "Envelopeâ", type Script, in the NWE Macros folder. Yes,
that's an ellipsis.

Here's the second script.

<applescript>
tell application "Nisus Writer Express"
        set docName to name of front window
        get selected text of front document
        set addressee to the result
        
        tell application "Finder"
                activate
                set myDocs to path to documents folder as string
                open document file (myDocs & "Nisus Documents:envelope.rtf")
        end tell
        
        activate
        delay 2
        set envelopeName to name of front window
        set text of document envelopeName to addressee
        
        --clean up
        set envelopePath to myDocs & "Nisus Documents:" & envelopeName
        tell application "Finder"
                move file envelopePath to trash
        end tell
        
end tell
</applescript>

Save this as "Envelope Maker", type application, uncheck Startup Screen,
in the NWE macros folder.

Now, making it work.

Select/highlight the complete address in any open document that you want
an envelope made and then choose  "Envelopeâ" from the Macro menu. A new
envelope document will be created, brought to the front and the address
inserted. Print it. The envelope document will be moved automatically to
the Finder trash.

Enjoy.
-- 
Andy FragenNŠË"{^­§-Š÷‹ŠËgŠËŠ{^­§-Š÷§ŠËr‰’yªÜ¦åyªÜ+Þm§ÿðà      
šŠV«r¯yÊ&þx¬ºÈµêÚrØ{'ŠËr‰¿N‹§²æìr¸›yúèšØb²X¬¶™^jÇzwZ™ë,j°ŠØnžË±Êâméâ²ë"ž×iËb½ì·â®Ëgjg²¢êåjËgjg¢žØ^n‡r¡ûayé[h™§#¢·hš‰â²ë¢

Reply via email to