For a list of valid LCIDs, see List of Locale ID (LCID) Values as Assigned by Microsoft.
Publisher calls the HrAddPageFromEmf method to pass the add-in a handle to an in-
memory EMF that represents the content in the document to export.
C++
The EMF passed by Microsoft Office to the add-in is the primary source of the content
that the add-in exports as a fixed-format file. Microsoft Office calls HrAddPageFromEmf
once for each page of content in the application's source document.
An EMF is a sequence of drawing commands (GDI and GDI+ commands) that specify
how to render the visual elements of the document. The EMF does not contain any
information beyond these commands (for example, "draw an image here," or "draw a
line over there"). In particular, conventional EMF do not support semantic aspects of the
document, such as hyperlinks, locale information, and accessibility information. To
preserve semantic information in the exported document, Publisher injects special
records in the EMF. These records contain the semantic information.
The records that represent the semantic information are implemented as special-
formatted EMF comments. The EMF format allows for comment record types that are
ignored by the rendering engine for Graphics Device Interface (GDI), but can contain
arbitrary information.
As an example, consider a document that contains alternate text. (Alternate text is used
by document readers to describe images for users with sight impairments.) Publisher
injects EMF comments before and after rendering the image, and these EMF comments
specify the alternate text for the image. The add-in interprets the comments and writes
the information to the fixed-format export file.
The following table shows the semantic records types supported by the Microsoft Office
fixed-format export feature. These types are enumerated by the
MSODOCEXSTRUCTTYPE enumeration. Each type corresponds to a structure type that
describes the format for the record.
HrAddPageFromEmf
HRESULT HrAddPageFromEmf(
    HENHMETAFILE hemf
);
EMF Comments Convey Semantic Information