RobVos
06-14-2011, 10:20 AM
Why does this not work? When this code runs, I still get the warning that the document being saved contains comments and it asks if I want to continue or cancel. I do not want this.
Application.DisplayAlerts = False
'Set path for saving
strPath = ActiveDocument.AttachedTemplate.Path & "\"
'Name the Spec file and save it
strSpecName = strPath & strWI & "_" & cboCategory.Value & "_" & txtWI.Value
ActiveDocument.SaveAs Filename:=strSpecName, FileFormat:=wdFormatXMLDocumentMacroEnabled
Application.DisplayAlerts = True
I do not want the user to click cancel if this warning appears. I also tried using Application.DisplayAlerts = wdAlertsNone But same results. How can I stop this alert?
Application.DisplayAlerts = False
'Set path for saving
strPath = ActiveDocument.AttachedTemplate.Path & "\"
'Name the Spec file and save it
strSpecName = strPath & strWI & "_" & cboCategory.Value & "_" & txtWI.Value
ActiveDocument.SaveAs Filename:=strSpecName, FileFormat:=wdFormatXMLDocumentMacroEnabled
Application.DisplayAlerts = True
I do not want the user to click cancel if this warning appears. I also tried using Application.DisplayAlerts = wdAlertsNone But same results. How can I stop this alert?