ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trap Save / Save As for all Excel workbooks (https://www.excelbanter.com/excel-programming/425919-trap-save-save-all-excel-workbooks.html)

Aurora[_2_]

Trap Save / Save As for all Excel workbooks
 
I'm trying to accomplish the following in Excel 2003: Intercept the
Save / Save As command and prompt user to enter a string that will be
used to populate one of the document properties. This was easy
enough for any new documents (via Workbook_BeforeSave placed in BOOK.
XLT). However, how can I achieve this for files the user, say,
receives via email from someone else? I came across a post suggesting
Win32 API for a similar task.. Any ideas would be greatly appreciated.

Héctor Miguel

Trap Save / Save As for all Excel workbooks
 
hi, Aurora !

instead of using code within your template ("book.xlt") give a try to application level events
- http://www.cpearson.com/Excel/AppEvent.aspx
- http://www.cpearson.com/Excel/Events.aspx
- http://www.cpearson.com/Excel/Classes.aspx
- http://www.cpearson.com/Excel/DefaultMember.aspx

hth,
hector.

__ OP __
I'm trying to accomplish the following in Excel 2003: Intercept theSave / Save As command
and prompt user to enter a string that will be used to populate one of the document properties.
This was easy enough for any new documents (via Workbook_BeforeSave placed in BOOK.XLT).
However, how can I achieve this for files the user, say, receives via email from someone else?
I came across a post suggesting Win32 API for a similar task. Any ideas would be greatly appreciated.




Aurora[_2_]

Trap Save / Save As for all Excel workbooks
 
thanks for your suggestion. I tried it but am not getting the desired
result. In which project should the class module be stored? I want
to trap events regardless of which file the user opens in Excel, and
don't want to install add-ins. Thanks


On Mar 23, 2:28*am, "Héctor Miguel"
wrote:
hi, Aurora !

instead of using code within your template ("book.xlt") give a try to application level events
-http://www.cpearson.com/Excel/AppEvent.aspx
-http://www.cpearson.com/Excel/Events.aspx
-http://www.cpearson.com/Excel/Classes.aspx
-http://www.cpearson.com/Excel/DefaultMember.aspx

hth,
hector.

__ OP __

I'm trying to accomplish the following in Excel 2003: Intercept theSave / Save As command
and prompt user to enter a string that will be used to populate one of the document properties.
This was easy enough for any new documents (via Workbook_BeforeSave placed in BOOK.XLT).
However, how can I achieve this for files the user, say, receives via email from someone else?
I came across a post suggesting Win32 API for *a similar task. Any ideas would be greatly appreciated.




All times are GMT +1. The time now is 05:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com