Hi all

I have a simple macro to automatically send email in MS Word using the email
header
For some unknown reason random users in our national office are missing the
Email button in Word.

So I am trying to capture this error using an error handler. However, the
errorhandler is provoked even when ActiveWindow.EnvelopeVisible = True is
successful..

Is there another way to capture this error? My code below.

Sub autonew()
On Error GoTo Errorhandler

ActiveWindow.EnvelopeVisible = True
frmDataArc.Show

Errorhandler:
MsgBox "Could not load the Email banner, close all applications Repair
Office"
Exit Sub

Many thanks.

RE: capture this error "method envelopevisible failed" by StevenM

StevenM
Fri Apr 11 07:06:05 PDT 2008

You need an "exit sub" before your errorhandler.

Also, the end should be "End Sub" not "Exit Sub" as you show it.

"Rue" wrote:

> Hi all
>
> I have a simple macro to automatically send email in MS Word using the email
> header
> For some unknown reason random users in our national office are missing the
> Email button in Word.
>
> So I am trying to capture this error using an error handler. However, the
> errorhandler is provoked even when ActiveWindow.EnvelopeVisible = True is
> successful..
>
> Is there another way to capture this error? My code below.
>
> Sub autonew()
> On Error GoTo Errorhandler
>
> ActiveWindow.EnvelopeVisible = True
> frmDataArc.Show
>
> Errorhandler:
> MsgBox "Could not load the Email banner, close all applications Repair
> Office"
> Exit Sub
>
> Many thanks.
>
>
>

Re: capture this error "method envelopevisible failed" by Rue

Rue
Sun Apr 13 16:10:33 PDT 2008

Thank you Steven

"StevenM" <StevenM@discussions.microsoft.com> wrote in message
news:9CB4FBC8-60F2-48C4-A662-1113153A616D@microsoft.com...
> You need an "exit sub" before your errorhandler.
>
> Also, the end should be "End Sub" not "Exit Sub" as you show it.
>
> "Rue" wrote:
>
>> Hi all
>>
>> I have a simple macro to automatically send email in MS Word using the
>> email
>> header
>> For some unknown reason random users in our national office are missing
>> the
>> Email button in Word.
>>
>> So I am trying to capture this error using an error handler. However,
>> the
>> errorhandler is provoked even when ActiveWindow.EnvelopeVisible = True is
>> successful..
>>
>> Is there another way to capture this error? My code below.
>>
>> Sub autonew()
>> On Error GoTo Errorhandler
>>
>> ActiveWindow.EnvelopeVisible = True
>> frmDataArc.Show
>>
>> Errorhandler:
>> MsgBox "Could not load the Email banner, close all applications
>> Repair
>> Office"
>> Exit Sub
>>
>> Many thanks.
>>
>>
>>