capture this error "method envelopevisible failed"

R

Rue

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.
 
S

StevenM

You need an "exit sub" before your errorhandler.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top