What I didn�t make clear George is that I wanted to open an existing custom
envelope template that has a company graphic on it. So it's not the size of
envelope that I'm especially after but the layout with the graphic. It has
my return address and a fancy graphic.

I've used OPEN "path of my document" and then GET DOCUMENT 1
And this works to get my document open and the address gets put in correctly
but now I can't get it to stop putting in the return address (over top of my
graphic). 

This is the changes I've made to the script. Anybody know why it still
produces a return address? -

set csz to c & " " & s & " �" & z

set m to "recep = " & AddQuotes(n) & " & vbCr & "

if s1 is not "" then
    set m to m & AddQuotes(s1) & " & vbCr & "
end if

if s2 is not "" then
    set m to m & AddQuotes(s2) & " & vbCr & "
end if

set m to m & AddQuotes(csz) & return

set m to m & "ActiveDocument.Envelope.PrintOut Address:=recep, Size:=\"Size
10\""

if b is "Yes" then
    set m to m & ", PrintBarCode:=True"
end if

tell application "Microsoft Word"
    activate
    try
        open "StarMax HD:Applications:Microsoft Office 2001:Templates:My
Templates:EnvelopeLucid"
        get document 1
    on error
        make new document
    end try
    do Visual Basic m


On 14/11/00 12:10 AM, "George Clark" <[EMAIL PROTECTED]> wrote:

>> Where you have the bit -
>> 
>> tell application "Microsoft Word"
>>   activate
>>   try
>>       get document 1
>> 
>> How could I get it to open an existing envelope template? I tried to write
>> - get MyEnvelope
>> But that didn't work. Would I have to use the whole address of the file?
>> 
>> Any thoughts would be appreciated.
> 
> AFAIK, there is no actual "envelope template" that comes with Word. You
> could create one and open that file (yes, you'd need the complete path), but
> as long as you use the PrintOut method that's in the VBA script, that will
> take care of adding an envelope to the front document if needed.
> 
> If you really want this to be an envelope before anything else is done,
> another option is to just create a new document when Word opens, then add
> this line to the beginning of the VBA code:
> 
>   Dialogs(wdToolsEnvelopesAndLabels).Execute


--
To unsubscribe:               <mailto:[EMAIL PROTECTED]>
To search the archives:
          <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to