The code that implements fixed-format export should use HrFinalize to perform tasks
such as flushing data buffers, writing remaining data to disk, and freeing memory and
other resources.
You can extend the fixed-format export feature of Office applications by implementing
the IMsoDocExporter interface. The methods of this interface provide a channel for
Office applications to communicate to the add-in the visual content and semantic
information in the document to export. The visual content of the document is provided
to the add-in as one or more in-memory enhanced metafiles. The semantic information
is provided as specially formatted comment records within this EMF. Additional methods
in the interface enable Office applications to communicate metadata and structural
information about the document.
For more information, see the following resources:
Word.Document.ExportAsFixedFormat2
Excel.Workbook.ExportAsFixedFormat
PowerPoint.Presentation.ExportAsFixedFormat3
Project.Project.ExportAsFixedFormat
Publisher.Documents.ExportAsFixedFormat
Visio.Document.ExportAsFixedFormat
OneNote.Application.Publish
HRESULT HrFinalize();
Conclusion
Additional Resources