OFT File Documentation


Summary

An Outlook File Template is a reusable Microsoft Outlook message saved as a blueprint: opening it starts a fresh, pre-filled email rather than showing a stored one. The .oft file is an OLE2 Compound File (the same binary container as .msg), with the MIME type application/vnd.ms-outlook. That is why double-clicking one opens a new composition window instead of a saved message.

Technical details

FeatureValue
Full nameOutlook File Template (Outlook item template)
File extension.oft
MIME typeapplication/vnd.ms-outlook
Format typeReusable MAPI message item, binary
Container / base formatOLE2 Compound File Binary (CFB), same as .msg
Message schema[MS-OXMSG] .msg item structure
DeveloperMicrosoft
IntroducedOutlook “Save As → Outlook Template”, long-standing across versions
Open standardNo (documented open specification, proprietary use)
Byte orderLittle-endian (CFB)
Magic number (hex)D0 CF 11 E0 A1 B1 1A E1 at offset 0
Sector layout512-byte or 4096-byte sectors, FAT/mini-FAT allocation
Body encodingsPlain text, HTML and compressed RTF streams
AttachmentsOptional, stored as embedded __attach_ storages
Opens asA new, unsent message (not a saved record)
Related extensions.msg, .eml, .pst, .ost, .dotx
Specificationlearn.microsoft.com/openspecs/office_file_formats/ms-oxmsg
File signature (magic bytes)
D0 CF 11 E0 A1 B1 1A E1

The 8 bytes at offset 0 are the OLE2 / Compound File Binary signature, historically nicknamed the “docfile” magic. It is the same header that opens a .msg message and the old .doc/.xls binaries, because all of them are OLE compound files: a FAT-like directory of named streams and storages inside one flat file. The header alone cannot tell an .oft template from a .msg message; that difference lives in the MAPI properties and the way Outlook stores the item, not in the first bytes.

What is an OFT file?

An Outlook File Template is a saved Microsoft Outlook item, almost always an email message, that Outlook treats as a reusable blueprint. When you open a .oft, Outlook does not display a stored message; it creates a brand-new, unsent message pre-filled with the template’s subject, formatted body, default recipients, signature and any attachments. You author one with File → Save As and choosing “Outlook Template (*.oft)”. It is the email equivalent of a Word .dotx template.

The confusion this file causes is almost always the same: someone double-clicks it expecting to read an email, and a blank composition window pops up instead. That is correct behaviour. A template is a form to generate messages from, not a record of correspondence. Saved messages are .msg or .eml; the archive of a mailbox is a .pst or .ost. An .oft sits apart from all of those as a message factory.

The OLE2 compound file container

Under the surface, a .oft is an OLE2 Compound File Binary (CFB), the same “file system in a file” container that holds a .msg message and the legacy .doc and .xls binaries. Every such file begins with the same 8-byte signature at offset 0.

offset 0x00 : D0 CF 11 E0 A1 B1 1A E1   compound-file signature
offset 0x08 : 16-byte CLSID (usually all zero)
offset 0x18 : minor version, major version (3 => 512-byte sectors, 4 => 4096)
offset 0x1C : byte order mark FE FF (little-endian)
offset 0x1E : sector shift (0x0009 = 512 bytes, 0x000C = 4096 bytes)
offset 0x2C : number of FAT sectors
offset 0x30 : first directory sector location
...          : DIFAT, FAT, directory and mini-FAT follow

The container divides the file into fixed-size sectors and chains them with a File Allocation Table, exactly like a miniature FAT disk. A directory of named entries then describes the streams (files) and storages (folders) that hold the actual content. Small streams are packed into a separate mini-FAT to avoid wasting whole sectors. All of this is little-endian, which is why the byte-order mark FE FF sits near the start.

Because the signature and container are shared, the first bytes of an .oft are byte-for-byte identical to a .msg. You cannot tell a template from a message by the header. The distinction is behavioural and property-driven: Outlook flags the item so that opening it composes a new message. This is why renaming a .msg to .oft does not reliably turn it into a working template, and why a stray .oft opened in a hex viewer looks like any other compound document.

The MAPI message streams inside

The payload follows the [MS-OXMSG] message layout, the same structure Outlook uses for a .msg. Message content is stored as MAPI properties, and each property becomes a named stream in the compound file whose name encodes the property tag and type.

__properties_version1.0        top-level property stream (fixed props, flags)
__substg1.0_0037001F           PidTagSubject          (Unicode string, type 001F)
__substg1.0_1000001F           PidTagBody             (plain-text body)
__substg1.0_10130102           PidTagHtml             (HTML body, binary)
__substg1.0_10090102           PidTagRtfCompressed    (compressed RTF body)
__recip_version1.0_#00000000   recipient storage (To/Cc defaults)
__attach_version1.0_#00000000  attachment storage (embedded file)

The stream name pattern is __substg1.0_ followed by an 8-hex-digit tag: the high four digits are the property ID and the low four are the property type. 001F marks a Unicode string, 0102 a binary blob. So __substg1.0_0037001F is the subject as Unicode text, and __substg1.0_10130102 is the HTML body as bytes. A message body is often stored three ways at once (plain text, HTML, and compressed RTF) so that whatever client opens it can render something sensible; the compressed RTF uses the LZFu scheme defined for Outlook.

Recipients and attachments are not streams but whole sub-storages, numbered #00000000, #00000001 and so on. Each attachment storage carries its own properties, including the attachment’s filename and its raw bytes in a PidTagAttachDataBinary stream. When you generate a message from the template, those embedded attachments ride along into every new email, which is exactly what makes templates useful for standardized replies and forms, and also what makes an untrusted .oft worth scanning.

The template flag: why it opens as a new message

Structurally a template and a saved message are nearly the same file. What separates them is message class and how Outlook loads the item. A normal saved mail has the message class IPM.Note; Outlook’s template handling opens the item in a compose (create) state rather than a read state, so the content becomes the starting point of a new draft. The item’s properties (subject, body, recipients) are copied into the new message, and Outlook does not associate the draft with the original .oft on disk, so saving the draft does not overwrite the template.

That behaviour is the whole point. A support team can ship one .oft with agreed wording and branding; every agent opens it to produce a fresh outbound email they then personalise and send. The template file itself never becomes correspondence. To edit the template, you open it, change the draft, then File → Save As → Outlook Template (*.oft) again, overwriting the blueprint rather than sending it.

Reading an OFT without Outlook

Because the body is stored as MAPI streams inside a binary compound file, a plain text editor shows mostly garbage. To read one without Outlook, three technical facts help. First, the HTML body lives in PidTagHtml (__substg1.0_10130102), so a MSG/OFT viewer can extract and display it directly. Second, since the file is an OLE compound document, a tool like 7-Zip can open the .oft as an archive and let you pull out the embedded attachment storages when all you need is the files inside. Third, converting to .eml unpacks the MAPI properties into the open, plain-text RFC 5322 message format that Thunderbird, Apple Mail and Windows Mail all read.

The newer “New Outlook” and Outlook on the web have only partial template support, so classic desktop Outlook remains the reliable tool for creating and editing .oft files. On the web the equivalent feature is My Templates or Quick Parts, which store snippets server-side rather than as loose .oft files on disk.

FAQ

Why did a blank new email open when I double-clicked the OFT?

That is expected. An .oft is a template, not a saved message, so opening it starts a fresh, pre-filled draft you edit and send. If you wanted to read a stored email, the file you need is a .msg or .eml instead.

Is an OFT the same file as a MSG?

They share the identical OLE2 container and the [MS-OXMSG] message structure, so their headers and internal streams look the same. The difference is role: a .msg is one stored message, while an .oft is a reusable blueprint that opens as a new message each time. Outlook can convert between them with Save As.

Why can’t I read an OFT in Notepad?

The subject and body are MAPI property streams inside a binary compound file, not plain text, so a text editor shows the raw container bytes. Use a MSG/OFT viewer, or convert the file to .eml or .html to get readable text.

References