PDA

View Full Version : Saving Excel workbook from Outlook



thistle
06-25-2013, 07:10 AM
I have a workbook that I open in Outlook containing some information I need. My VBA code in Outlook modifies some cells in the workbook, saves and closes it.

It does the job, but when I save (using Workbook.SaveAsI get a dialog saying that the file exists and do I want to overwrite. I get the same dialog if I use Workbook.Save
I want to stop this dialog coming up. In Excel I would use Application.DisplayAlerts = False but this isn't available in Outlook.

Can anybody tell me how to suppress this dialog in Outlook?

thistle
06-28-2013, 10:16 AM
Answering my own question in case anybody else has the same problem:

It seems that the cause of the alert was:
Workbook.Close SaveChanges:=False
Using the following seems to have fixed it:
Workbook.Save
Workbook.Saved = True
Workbook.Close