PDA

View Full Version : Workbook_BeforeSave



ilariak2102
07-18-2012, 11:28 AM
Workbook_BeforeSave

Should Workbook_BeforeSave execute when saving directly from email?

:think:

Thanks in advance for all responses.
Kay

GTO
07-18-2012, 12:39 PM
Hi Kay,

By "saving directly from email," do you mean opening the attachment to the mail message and doing a SaveAs, or do you mean right-clicking on the attachment in the email and doing a SaveAs without opening it?

Mark

ilariak2102
07-18-2012, 12:53 PM
Mark, Thanks for asking. Let me clarify.
I mean one of two cases:
a) Right-clicking to SaveAs without opening, just as you mentioned
b) Clicking on attachment, and getting three options {Save, Open, Cancel} in the download dialog box and clicking on Save.

:thinking:
Kay.


Hi Kay,

By "saving directly from email," do you mean opening the attachment to the mail message and doing a SaveAs, or do you mean right-clicking on the attachment in the email and doing a SaveAs without opening it?

Mark

GTO
07-18-2012, 10:35 PM
Mark, Thanks for asking. Let me clarify.
I mean one of two cases:
a) Right-clicking to SaveAs without opening, just as you mentioned
b) Clicking on attachment, and getting three options {Save, Open, Cancel} in the download dialog box and clicking on Save.

:thinking:
Kay.

Hi Kay,

I am at work, so am in 2010 for both Excel and Outlook. BeforeSave did not run when I tested sending myself Excel workbooks in both .xlsm and .xls format. FWIW, I do not see how any of the workbook events could fire when doing a SaveAs on the closed workbook, so no, I don't believe it should.

In re-reading your first question, I realize that you did not actually say it was/is happening, just that you were wondering if it would. It should not, as the workbook must be opened/loaded into memory, for any of these events to occur. Does that help?

Mark

ilariak2102
07-19-2012, 06:34 AM
Mark,
Thanks a ton for taking the time to reply.

You are right. I actually tried it and found that the events were not firing. I was wondering whether I was doing something wrong.
From your response I am concluding that these event will not fire from a closed book.


:wavey:
Kay



Hi Kay,

I am at work, so am in 2010 for both Excel and Outlook. BeforeSave did not run when I tested sending myself Excel workbooks in both .xlsm and .xls format. FWIW, I do not see how any of the workbook events could fire when doing a SaveAs on the closed workbook, so no, I don't believe it should.

In re-reading your first question, I realize that you did not actually say it was/is happening, just that you were wondering if it would. It should not, as the workbook must be opened/loaded into memory, for any of these events to occur. Does that help?

Mark