Prevent Sending eMail from Excel

G

Greg Lovern

Is it possible to *PREVENT* the user from sending email from Excel (in
Excel 2010, File | Save & Send | Send Using E-mail | Send as
Attachment)?


Thanks,

Greg
 
D

Don Guillett

Is it possible to *PREVENT* the user from sending email from Excel (in
Excel 2010, File | Save & Send | Send Using E-mail | Send as
Attachment)?

Thanks,

Greg

What's to prevent the user from attaching a file to any email.
 
G

Greg Lovern

What's to prevent the user from attaching a file to any email.

Hi Don,

The user could certainly get around the restriction if they wanted to.
The idea is to prevent them from emailing it before they've finished
filling it out. I can check the fields -- I'm already doing that
before they save the workbook -- but if checking shows that one of the
required fields is not filled out, I want to prevent them from
emailing it until they fill out all the required fields. If they
decide to go through some extra steps to get around the limitation,
that's fine -- in that scenario, they will have been warned and will
be aware of what the business consequences are of sending it out
incomplete.

Greg
 
G

GS

It happens that Greg Lovern formulated :
Hi Don,

The user could certainly get around the restriction if they wanted to.
The idea is to prevent them from emailing it before they've finished
filling it out. I can check the fields -- I'm already doing that
before they save the workbook -- but if checking shows that one of the
required fields is not filled out, I want to prevent them from
emailing it until they fill out all the required fields. If they
decide to go through some extra steps to get around the limitation,
that's fine -- in that scenario, they will have been warned and will
be aware of what the business consequences are of sending it out
incomplete.

Greg

This would require 'hooking' all menus that send email to use your
procedure BEFORE allowing the built-in process to continue. You could
abort the email at this point, notifying the user that required fields
are incomplete.

As Don suggests, though, this won't stop users from going around your
efforts.

I recommend using a control variable (to set the state of the fields)
that you can check to determine if requirements are met. This could be
something as simple as a public boolean (ie: gbAllowEmail) that you set
according to the same criteria you use for saving the file.

You can 'hook' the built-in menus by reassigning their 'OnAction'
property at startup (wkb.Open). Be careful, though, to 'Reset' these
menus at shutdown (wkb.Close)!
 

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