Skip to content

Commit

Permalink
suppress the comment warning on SaveAs()/SaveAs2()
Browse files Browse the repository at this point in the history
  • Loading branch information
ildar-shaimordanov committed Feb 27, 2019
1 parent 18a6242 commit 89700be
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions doc2html.js
@@ -1,7 +1,7 @@
//
// doc2html and more
//
// Copyright (c) 2004, 2009, 2010, 2012, 2016 Ildar Shaimordanov
// Copyright (c) 2004, 2009, 2010, 2012, 2016, 2019 Ildar Shaimordanov
//

///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -225,6 +225,9 @@ try {
warn('WINWORD is starting');
var word = new ActiveXObject("Word.Application");

word.DisplayAlerts = 0;
word.Options.WarnBeforeSavingPrintingSendingMarkup = false;

if ( WScript.Arguments.Named.Exists('fg') ) {
warn('Activating and displaying of the WINWORD in foreground');
word.Visible = true;
Expand Down Expand Up @@ -253,7 +256,7 @@ try {
}

warn('Save as "' + newfile + '"');
doc.SaveAs(
doc.SaveAs2(
// FileName
newfile,
// FileFormat
Expand Down Expand Up @@ -283,7 +286,11 @@ try {
// AllowSubstitutions
false,
// LineEnding
fileLineEnding);
fileLineEnding,
// AddBiDiMarks
true,
// CompatibilityMode
0);

warn('Close this document');
doc.Close();
Expand Down

0 comments on commit 89700be

Please sign in to comment.