Using Office HTML Filter at the Command Prompt


Microsoft Office 2000 HTML Filter version 2.0 removes Office-specific markup from Web pages created in Microsoft Word 2000 and Microsoft Excel 2000 without affecting how the Web pages appear in browsers.

Office HTML Filter can be used in three different ways: from the MS-DOSĀ® command prompt, from the Office HTML Filter dialog box, and from within Word 2000. When you use the filter from the command prompt, you can select multiple options to process files in .htm file format.

Note  When you use the Office HTML Filter dialog box, you can select options by clicking Options in the dialog box. 

Download the HTML Filter 2.0 for Office 2000 self-extracting executable file from Microsoft Office Update.

Switches You Can Use at the Command Prompt

The following table identifies the switches that you can use at the command prompt for Office HTML Filter version 2.0.

Switch

Description

-a

Leaves standard @-rule definitions (@page and @font-face) in the HTML file.

-b

Prevents a backup copy (.bak) of the input file from being created. The setting is only relevant when there is no output file. If you specify an output file, the input file remains unchanged. 

-c

Removes all standard cascading style sheet (CSS) properties.

-f

If any of the files being created by the utility already exist, this option overwrites those files without prompting the user. If you do not specify this option, the program prompts you when it finds an existing file.

-l

Removes LANG attributes (language information), such as in <body lang=EN-US>.

-m

Prevents the creation of GENERATOR and ORIGINATOR META tags, which contain information about the originating program (Word or Excel) and the latest generating program (Office HTML Filter).

-o

Leaves Office-specific mso- properties and XML tags that represent document settings in the HTML file.

-r

Prevents the display of the percentage change in file size.

-s

Removes local STYLE elements so that when you link to an external style sheet, style elements in the local document will update when the external style sheet is updated.

-t

Deletes nonessential linked files from the supporting files folder associated with the input file.

-v

Keeps VML, but deletes static images.

-x

Exports the styles stored in the Word document into an external  style sheet (CSS).

You can see a list of these switches by starting MS-DOS and typing filter -? at the command prompt.

How to Use Office HTML Filter from the Command Prompt

Start MS-DOS, and then type filter InputFile OutputFile at the command prompt to create a filtered version of the input file.

Syntax

filter [ -a | -b | -c | -f | -l | -m | -o | -r | -s | -t | -v | -x | -ab | . . .] <InputFile>[<OutputFile>]

InputFile indicates the file to be processed. OutputFile indicates the resulting file. If you do not specify an output file, InputFile is automatically overwritten.

Example

filter -bt myfile.htm

This example processes the file MyFile.htm by saving the result in MyFile.htm without creating a backup (-b), and by deleting all the nonessential linked files from the supporting files folder (-t). You can also use the following syntax to achieve the same result:

filter -b -t myfile.htm

filter /b /t myfile.htm

See Also

Using Office HTML Filter to Remove Office-specific Markup

Use Office HTML Filter to Create Web Pages That Download Faster

Return to Main Menu

Return to Advanced Menu