Field codes: FileSize field

Applies To
Word for Microsoft 365 Word for Microsoft 365 for Mac Word 2021 Word 2021 for Mac

The FileSize field inserts the size of the document, in bytes, using information from the General tab in the Properties dialog box.

To view the Properties dialog box, select File > Info > P****roperties, and then select Advanced Properties.

Note

The content and steps in this article apply to Word for Microsoft 365 and other desktop versions of Word for Windows and Mac.

Syntax

When you view the FileSize field code in your document, the syntax looks like this:

{ FILESIZE [Switches ] ⁠}⁠

Note

A field code tells the field what to show. Field results are what is shown in the document after having evaluated the field code. To toggle between viewing the field code and the field code results, press Alt+F9.

Switches

\k

Displays the result in kilobytes (K), rounded to the nearest whole number.

\m

Displays the result in megabytes (MB), rounded to the nearest whole number.

Examples

Field Results (in a 2,084,228-byte document)
⁠{⁠ FILESIZE \k ⁠}⁠K
⁠{⁠ FILESIZE \m ⁠}⁠ MB
2084K
2 MB