ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Naming a workbook WITHOUT saving it? (https://www.excelbanter.com/excel-programming/356692-naming-workbook-without-saving.html)

Maury Markowitz

Naming a workbook WITHOUT saving it?
 
I use Excel to make workbooks up from inside Access, then call Excel's
Outlook integration to send it:

oExcelApp.ActiveWorkbook.SendMail Recipients:=Array(...

However, this sends out the book with the default name, like "Book 1" and
such. Is there some way to change the name of the book without saving it?
This obvious solution does NOT work:

oExcelApp.ActiveWorkbook.Name = "New name"

If there is no way to do this without saving, where is a good "temp"
location to save it to?

Maury

Maury Markowitz

Naming a workbook WITHOUT saving it?
 
"Tom Ogilvy" wrote:

No, you must save it to name it.

However after sending it you could Kill it

kill "C:\Temp\Mybooks.xls"


Fair enough! Is \temp\ always available on C?

Maury


All times are GMT +1. The time now is 06:15 PM.

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