Thank you Steven
"StevenM"
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.
>>
>>
>>