anchor.diff:          NonsensePassword := 'tfm554!ghAGWRDD';
   
           try
  -          //Open doc and save in requested format.
  +          // Open doc and save in requested format.
             Wordapp.documents.Open( FileToConvert,  // FileName
                                   false,          // ConfirmConversions
                                   true,            // ReadOnly
                                   EmptyParam,    // AddToRecentFiles,
                                   NonsensePassword    // PasswordDocument,
  -                                    // PasswordTemplate,
  -                                    // Revert,
  -                                   // WritePasswordDocument,
  -                                   // WritePasswordTemplate,
  -                                    // Format,
  -                                   // Encoding,
  -                                   // Visible,
  -                                    // OpenAndRepair,
  -                                    // DocumentDirection,
  -                                    // NoEncodingDialog,
  -                                    // XMLTransform     *)
  -
                                   );
   
             // For some reason if the document contains a TableofContents, it hangs Word.  In older
  
positive.code:             begin
               log('SKIPPED - Document has TOC: ' + fileToConvert , STANDARD);
               Result.Error := 'SKIPPED - Document has TOC:';
                WordExitAction := aClose;
              end;
            end;
          except
          on E: Exception do
          begin
            // if Errro contains EOleException The password is incorrect.
            // then it is password protected and should be skipped.
            if ContainsStr(E.Message, 'The password is incorrect' ) then
            begin
  
negative.code: ﻿unit WordUtils;
  (*************************************************************
  Copyright © 2012 Toby Allen (http://github.com/tobya)
  
  