Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Prevent Sending eMail from Excel

It happens that Greg Lovern formulated :
On Aug 27, 12:03*pm, Don Guillett wrote:
On Aug 27, 11:31*am, Greg Lovern wrote:

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.


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)!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending An Email In Excel Programmatically W/O Sending An Object [email protected] Excel Programming 8 December 1st 08 09:35 PM
sending email from excel 97 tysop Excel Programming 1 January 26th 06 03:01 PM
Sending Email From Excel Help! lehainam[_19_] Excel Programming 3 September 6th 05 05:11 AM
Sending email from Excel Denise Posey Excel Programming 9 February 4th 04 09:29 AM
Prevent dialog - Prevents Sending Excel File From Outlook JP[_7_] Excel Programming 7 August 18th 03 06:25 PM


All times are GMT +1. The time now is 07:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"