Title: Re: Stationery
On 2/14/02 6:07 AM, "Jim Warthman" <[EMAIL PROTECTED]> wrote:

> On 2002-02-13 12:15 PM, "Paul Berkowitz" <[EMAIL PROTECTED]> wrote:
>
>> On 2/12/02 9:00 AM, "Jim Warthman" <[EMAIL PROTECTED]>
>> wrote:
>>
>>>
>>> I think Project Gallery would be the logical place to keep stationery for
>>> Notes, e-mail, and other Entourage object types. If anyone knows how to do
>>> this, please let me know. If there is some alternative that works at least
>>> with Notes, I'd like to know that as well.
>>
>>
>> Just make your Note "template" as a Note. When you want to use it, select it
>> and press command-D to duplicate it. Open the duplicate, make whatever
>> additions you want, rename it and save it. There you are.
>
> Paul,
> Thanks for the suggestion.
>
> While this would work, it requires that I first open a "Notes View", then
> duplicate, rename, and open the appropriate template. As a workaround this
> is okay. But it would be simpler and more convenient if I could just use
> File/Project Gallery to open a new note using the template. This should work
> regardless of which Entourage window I have open.
>
> I hope the developers will consider adding more Project Gallery features to
> Entourage in a future release.
>

First make your template. Select it and run the following script once so the script knows which Note is the template. Then it will always open a  "duplicate" for you with the name pre-selected for renaming when you press control-command-N if you name the script

    Note Template 1 \cmN

You can make other templates, using other unused keyboard shortcuts, by using different copies of script with different name and shortcuts (such as Not Template 2 \comN  with control-option-command-N)

Because of a bug in Entourage's AppleScripting, it will only make notes with your default font, color, size. I hope that's fixed soon. Then I'll change the script.

-------------------------------------------------
property templateID : 0

if templateID = 0 then
    
    tell application "Microsoft Entourage"
        
        try
            set noteTemplate to item 1 of (get selection)
            if class of noteTemplate is not note then error number -128
        on error
            beep
            display dialog "First you have to select a note to be your template, then run the script again." buttons {"cancel"} default button 1 with icon 0
            return
        end try
        
        set templateID to ID of noteTemplate
        set templateName to name of noteTemplate
        
        display dialog "\"" & templateName & "\" is now set up as a Note Template." & return & return & "Press control-command-N to open a new instance any time." buttons {"OK"} default button 1 with icon 1
        return
        
    end tell
    
else
    
    tell application "Microsoft Entourage"
        
        try
            set noteTemplate to note id templateID
        on error
            set templateID to 0
            beep
            display dialog "Your saved note template no longer appears to exist." & return & return & "The script has now been reset to default: select a new note template and run the script once to reset it to the new template." buttons {"OK"} default button 1 with icon 2
            return
        end try
        
        set templateName to name of noteTemplate
        set dupName to templateName & " copy"
        set templateCats to category of noteTemplate
        set templateContent to content of noteTemplate
        
        set dupNote to make new note with properties {name:dupName, content:templateContent, category:templateCats}
        
        open dupNote
        
    end tell
    
end if



--------------------------------

[To replace the template with another one, delete the old one, run the script once to reset defaults, then select a new template and run script once to set to new template.]

--
Paul Berkowitz

Reply via email to