Transacted files allow Word to open a file, write to it, and have other programs-such as Microsoft Excel-write to it, but still retain the right to restore the file to the state it was in when Word first opened it. These modes are discussed later in this article. Word can open document files using two different modes: transacted and direct. This temporary document file is used to store all OLE objects that belong to unnamed documents, Undo, the Clipboard, and documents whose native formats are not document format (for example. You can determine that it is a document file because the initial size is 1,536 bytes. At startup, Word creates one temporary (direct) document file called ~wrfxxxx.tmp. Additionally, document files have inherent properties that allow Word to create files and directories within files. The difference between this file and a traditional MS-DOS file is that multiple programs can read and write to these files without the original owner knowing about it. Types of temporary files MS-DOS-Based File By saving to a temporary file first and then renaming the file to the proper name, Word ensures the data integrity of your original file against problems (such as a power failure or lost network connections) that may occur while the file is being written. Word uses temporary files as a "safety net" to protect against system errors in its file-saving scheme. This movement to temporary files on disk frees more memory for text manipulation or storage of the parts of the document that are being actively edited.
#Ms word temp files location code#
If there is not enough memory available to keep the document with all its edits in memory and still perform manipulations such as sorting, dragging, scrolling, and so on quickly along with any other applications that are running, then Word moves part of its code that is not being used or part of the document that is not being edited from memory to disk. Why does Word create temporary files? Speed When Word is shut down in a normal fashion, all temporary files are first closed and then deleted.
The temporary files only exist during the current session of Word. For example, Word determines automatically where and when it needs to create temporary files.
#Ms word temp files location free#
More Information Definition of a temporary fileĪ temporary file is a file that is created to temporarily store information in order to free memory for other purposes, or to act as a safety net to prevent data loss when a program performs certain functions.
This article explains when, where, and how Microsoft Word for Windows creates temporary files. Lessįor a Microsoft Word 97 version of this article, see 89247. Office Products Microsoft Word 2010 More.