Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sending An Email In Excel Programmatically W/O Sending An Object | Excel Programming | |||
sending email from excel 97 | Excel Programming | |||
Sending Email From Excel Help! | Excel Programming | |||
Sending email from Excel | Excel Programming | |||
Prevent dialog - Prevents Sending Excel File From Outlook | Excel Programming |