Hi Folks,

I'm creating a workbook to enable our pensions team to produce reports.

At the moment, part of the process is opening the SaveAs dialog box. (Here's my full code below - it's heavily commented so that if changes are needed and I'm not available, someone can at least follow the logic - even if it is flawed! )

What I'd like to do instead is save the file to the users temp folder, then, after it has been attached to an email and sent, kill that file from the temp folder.

Can anyone offer advice on how I can do this?

Here's my code for the SaveAs dialog. I'm guessing this would be replaced with defining the Environ("TEMP") along with the variables below
    Application.Dialogs(xlDialogSaveAs).Show Sheets("Calcs").Range("a2") & ".xlsx"
    Application.CutCopyMode = True
and i add it to the email as follows:
.Attachments.Add ActiveWorkbook.FullName
I'm guessing that somehow I need to save it to the users temp file Environ("TEMP")? and then refer to that in the .Attachments.Add Activeworkbook.FullName

At the end of the Macro, I'd add something along the lines of Kill Environ("TEMP") ActiveWorkbook.FullName

That's my theory, I just don't know whether I need to add Dim's etc.

Any help would be appreciated.

MM