Outlook version of Excel command?

Status
Not open for further replies.

Dr. Demento

Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Is there a Outlook version of Excel's Application.DisplayAlerts = False? I'm repeatedly overwriting an excel file from Outlook and don't want to deal with the "Are You Really Sure You Want To Do This?" dialog box
 

Dr. Demento

Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Michael,

I appreciate the response.

I'm getting conflicting messages. My first thought is that the dialog is from Outlook because Outlook VBA is writing to a closed Excel workbook and the Excel application has yet to be launched. However, the dialog box title is "Microsoft Excel" (see attached).
Excel Dialog.JPG
Since the VBA is operating exclusively from Outlook (source code - altered to write to a set filename with current date, where strFil InputBox is replaced with strFile = "H:\Documents\_Shortcuts\Outlook Item List_" & Format(Now, "yyyymmdd") & ".xlsx"),
I'm confused as to how 1) the dialog is coming from Excel if Excel isn't even "running" and 2) how would I put code in Excel to alter the behavior that originates in Outlook.
[DOUBLEPOST=1444230435][/DOUBLEPOST]Diane,

I was hoping to be able to suppress the warning from Outlook using an analog of DisplayAlerts = False.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
It doesn't matter where the code is running. You most likely call Workbook.Save*, so you're calling a method of the Excel library.

Workbook.Application refers to the Excel application object, so it's pretty simple: Workbook.Application.DisplayAlerts=false

You just need to insert the variable name you use for Workbook.
 
Status
Not open for further replies.
Top