List of Articles

Examples of how to use DocTo

Docto Version:%s
Office Version : %s
Open Source:
Description: DocTo converts Word Documents and Excel Spreadsheets to other formats.

Command Line Parameters:
Each Parameter should be followed by its value eg
        -f "c:\Docs\MyDoc.doc" -O "C:\MyDir\MyFile"
Parameters markers are case insensitive. Short and Long can be used mixed. All
parameters and values need to be seperated by a ' ' space.

  -H  This message
      --HELP -?
  -WD Use Word for Converstion (Default). Help '-h -wd'
  -XL Use Excel for Conversion. Help '-h -xl'
  -PP Use Powerpoint for Conversion. help '-h -pp'
  -F  Input File or Directory
  -FX Input Extension to search for if directory. (.rtf .txt etc)
      Default ".doc*" (will find ".docx" also)
  -O  Output File or Directory to place converted Docs
  -OX Output Extension if -F is Directory. Please include '.' eg. '.pdf' .
      If not provided, pulled from standard list.
  -T  Format(Type) to convert file to, either integer or wdSaveFormat constant.
      Available from
      See current List Below.
  -TF Force Format. -T value if an integer, is checked against current list
      compiled in. It is not passed if unavailable.  -TF will pass through value
      without checking. Word will return an "EOleException  Value out of range"
      error if invalid. Use instead of -T.
  -L  Log Level Integer: 1 ERRORS 2 STANDARD 5 CHATTY 9 DEBUG 10 VERBOSE. Default: 2=STANDARD
  -C  Compatibility Mode Integer. Set to an INTEGER value from
      Set the compatibility mode when you want to convert documents to a later
      version of word. See help '-h -c' for further info.
  -E  Encoding Integer: Sets codepage Encoding.  See
      for more details and values.
  -M  Ignore all files in __MACOSX\ subdirectory if it exists.  Default True.
  -N  Make list of files that take over n seconds to complete.
      Use number of seconds over that conversion takes and add to list.
      Outputs to filename 'docto.ignore.txt'
  -NX Ignore any file listed in docto.ignore.txt, created by -N
  -G  Write Log to file in directory
  -GL Log File Name to Use. Default 'DocTo.Log';
  -Q  Quiet Mode: Nothing will be output to console.  To see any errors you must
      set -G or -GL. Equivalent to setting -L 0
  -R  Remove Files after successful conversion: Default false; To use specify
      value eg -R true
  -W  Webhook: Url to call on events. See help '-H -HW' for more details.
  -X  Halt on COM Error: Default True;  If you have trouble with some files
      not converting, set this to false to ignore errors and continue with
      batch job.
  -V  Show Versions.  DocTo and Word/Excel/Powerpoint

Long Parameters:
      PDF conversions can take their bookmarks from
      WordBookmarks, WordHeadings (default) or None
      If you wish for a converted PDF to be opened after creation. No value req.
      Save a range of pages to pdf. Integer/String. If integer --PDF-ToPage must also be set.
      Other values wdExportCurrentPage, wdExportSelection
      Save a range of pages to pdf. Integer. --PDF-FromPage must also be set.
      Existing files are overridden by default, if you do not wish a file to be
      skipped if its output exists, use this.
      EXPERIMENTAL.  Will skip any docs that contain a TOC to prevent hanging.
      Currently matches some false positives.  Default False.

200 : Invalid File Format specified
201 : Insufficient Inputs.  Minimum of Input File, Output File & Type
202 : Incorrect switches.  Switch requires value
203 : Unknown switch in command
204 : Input File does not exist
205 : Invalid Parameter Value
220 : Word or COM Error
221 : Word not Installed
400 : Unknown Error

DocTo source on Github| Index of Examples | Download Latest Release