From: Paul W Smith on
I have a workbook which I have written code which will not allow the user to
save the workbook unless they have provided specific pieces of information.

I had intended to not allow users to Email the worbook without the specific
information being present. My thought process was if they cannot save it
they
cannot attached it to an Email.

What users have found a way to do is to Email the unsaved workbook using
SendTo.

Can anyone suggest any way I can stop the users doing this?


From: Paul W Smith on
Just in case anyone ever comes across this post looking for the same
information to was here is a solution. This was suggested to me by Ron de
Bruin.

Use the Workbook Open event to disable the SendTo functionality.

Dim Ctrl As Office.CommandBarControl
For Each Ctrl In Application.CommandBars.FindControls(ID:=30095)
Ctrl.Enabled = False
Next Ctrl

And to return this functionality to the user in the Workbook BeforeClose
event use:

Dim Ctrl As Office.CommandBarControl
For Each Ctrl In Application.CommandBars.FindControls(ID:=30095)
Ctrl.Enabled = true
Next Ctrl

The ID of the SendTo control is 30095




"Paul W Smith" <pws(a)NOSPAM.twelve.me.uk> wrote in message
news:Oi5CNh$%23KHA.148(a)TK2MSFTNGP06.phx.gbl...
>I have a workbook which I have written code which will not allow the user
>to
> save the workbook unless they have provided specific pieces of
> information.
>
> I had intended to not allow users to Email the worbook without the
> specific
> information being present. My thought process was if they cannot save it
> they
> cannot attached it to an Email.
>
> What users have found a way to do is to Email the unsaved workbook using
> SendTo.
>
> Can anyone suggest any way I can stop the users doing this?
>
>