Home
Download your own copy of Doc To HTML Converter today!Prev Page Prev Page
Introduction
Using DocToHtml
Getting Started
Conversion Options Dialog
General
Output Filenames
Template Data Editor
Images
Meta Tags
CSS
Advanced
JavaScript
HTML Code
Font Attr
Paragraph Attr
List Attr
Table Attr
Text Boxes
Body & Footer
Footnotes & Endnotes Options
HTML Template
XML & Charset & PG
Browsers
Search & Replace
Batch
Filemasks
Progress Form
Batch Converter
Main Window
Settings Dialog
General
Memory
Timeouts
Command Line Support
Search & Replace Dialog
Installation Issues
Uninstallation Issues
Crash Recovery
Support for 64-Bit MS Word
Troubleshooting
Common Issues
Deep Troubleshooting
Registration Benefits
How to Buy
Support & Feedback
FAQ
How to Speed up the Conversion
Unsupported Formatting
License Agreement
Privacy Policy
Change Log
Credits
Other Products

DocToHtml—Output Filenames

This topic only applies to the filenames of an (X)HTML document's subsequent parts, that is, when the splitting mode is ON. The first output (X)HTML file is always named according to the value in the Save Result To field, regardless of Filename markers (or renaming options). This topic also applies to the filenames of output images when the Custom Filenames checkbox is ON.

Filename Pattern Dialog

By default, DocToHtml names all output files by appending the _X or _XX suffix to the first output filename, where X or XX is the ordinal part number of an output file. For example, if you have entered OutputDoc.html into the Save Result To field on the General Tab, the subsequent generated parts will be named OutputDoc_2.html, OutputDoc_3.html, OutputDoc_4.html, and so on. If you wish, you can override this setting by checking the Rename checkbox (just below the splitting level drop-down box on the General Tab of the Conversion Options dialog). If you enable this option, the button at the right of it will become active, so that you can enter a different default part naming pattern.

The following variables are available for part and image filenames:
VariableMeaning
FILENAMEThe default filename for a given part or image, without extension.
INPUT_FILENAMEThe filename of the original MS Word document.
PART_NUMBERThe ordinal number of the current part.
EXTThe output extension, with a leading dot; or an empty string, if there is no extension.
ORIGINAL_FILENAMEThe filename of the first output document, without extension.
HEADINGThe text of the heading the given part starts with. Not applicable to image filenames.
OUTLINEThe list number of the first paragraph of a given part. For example, 1.1, 1.2.3, and so on. For the first part, this variable is always an empty string.
IMAGE_NUMBERDecimal string representation of the ordinal number of a given output image. Applicable to image filenames only.
IMAGE_PART_NUMBERDecimal string representation of the ordinal number of a given output image within a given output part of the document. Applicable to image filenames only. For each new output part, the numeration begins with one.

Make sure to enclose each variable in the % characters. For example, to put a dot and a part number just before the extension of the output document’s filename, enter %ORIGINAL_FILENAME%.%PART_NUMBER%%EXT% into the “Part Filename default pattern” field. Then the subsequent generated parts will be named OutputDoc.2.html, OutputDoc.3.html, OutputDoc.4.html, and so on. If you do not specify any output extension, the program will automatically use the default one. Please note that if the filename contains a dot, anything to the right it will be treated as a file extension.

Ignore Filename markers embedded into document is an option that lets you tell the program to ignore such markers. The details are given below.

Insert Filename markers dialog

The dialog shown on the screenshot above lets you easily insert a new filename marker for DocToHtml. To open the dialog, use the “Insert Filename marker...” command in the menu (MS Word 2000, XP, or 2003) or use the respective DocToHtml ribbon toolbar button (MS Word 2007, 2010, or 2013). When enabled, Filename markers override the default part filename. Internally, Filename markers are implemented as private MS Word fields. You can also create them by hand—just press CTRL+F9 and manually enter a field code. For example, to get the same result as by using the dialog above, enter
 PRIVATE DTH Filename!FirstPage 
as a field code. Here PRIVATE creates a special field, ignored by MS Word; DTH is an acronym for DocToHtml, to mark the field as created by this program; Filename designates the type of the field (in future, other field types may be used); and finally after the ! sign, the program expects actual field content. Make sure to put leading and trailing spaces after the starting { and before the ending } characters. If you don’t specify any output extension, the program will automatically use the default one. To hide or unhide the DocToHtml private fields (or their codes), toggle the “Show/Hide Hidden text” button on MS Word’s Standard toolbar. If nothing happens, try doing the following. In MS Word 2003, XP, or 2000, open the Options dialog from the Tools menu and toggle the “Hidden text” checkbox on the View Tab. In MS Word 2007, 2010, or 2013, go to Options, then to the Display Tab, and toggle the “Hidden text” checkbox (see the screenshot below).

Hidden Text checkbox in MS Word 2007, 2010, and 2013

DocToHtml will process only Filename markers placed in the headings (first paragraphs) of document parts or sections. Any Filename markers placed in other locations will be ignored.

Select Filename markers dialog

The dialog shown on the screenshot above lets you navigate through DocToHtml private fields (such as Filename markers) inserted into the current document. To open the dialog, use the “Go to Filename marker...” command from the menu (MS Word 2000, XP, or 2003), or click the respective DocToHtml ribbon toolbar button (MS Word 2007, 2010, or 2013).