Problem with ActiveWorkbook.EnvelopeVisible
My workbook creates a new Workbook (thanks Doug for the class
example) and I want to be able to email it.
I use ActiveWorkbook.EnvelopeVisible=TRUE to open the Send Email (same
as FILE-SEND TO- MAIL RECIPIENT) which is great because it really
shows what the user is supposed to do.
I want to be able to turn it off and
ActiveWorkbook.EnvelopeVisible=FALSE does not work properly for some
reason.
The headers (To From Subject, etc) are removed but not the space
occupied by them.
If I use ActiveWorkbook.EnvelopeVisible=TRUE followed by
ActiveWorkbook.EnvelopeVisible=FALSE then excel works correctly.
The problems seem to be that ActiveWorkbook.EnvelopeVisible=FALSE is
not called in the same macro.
It is actually in the sub Workbook_BeforeClose, if the user clicks the
Excel close button then what I want it to do is just close the new
workbook and close the send email feature.
It works but the empty space left is a problem.
How can I fix this?
ActiveWorkbook.EnvelopeVisible=TRUE
|