C++
The docexoption parameter specifies the output option and the (p)dwVal parameter
specifies the value for the option.
While the built in exporter in Office uses GetOutputOption and SetOutputOption, an
add-in can implement its own method of getting and setting options and it own user
experience for the options.
For the implementation of fixed-format export in Office, Publisher calls the
GetOutputOption method to retrieve output options for display to the user in the
Publish as PDF or XPS dialog box. For add-ins developed by third-party software
developers, Publisher calls GetOutputOption with only the
msodocexOptionTargetDPIColor value. This is the only value that an add-in needs to
support. If the add-in's implementation of GetOutputOption is called with this value, it
should return the target dots-per-inch (DPI) for 3-D effect rasterization.
Microsoft Office Calls SetOutputOption for Fixed-Format Add-Ins
For both the implementation of fixed-format export in Office and for add-in
implementations, Publisher calls SetOutputOption at the beginning of the fixed-format
export process. In the implementation in Office, the parameter values passed in specify
fixed-format output options. However, if the add-in implements its own set of options,
the add-in can disregard the options passed to it by Publisher.
Publisher calls the EnableCancel method to pass the add-in a pointer to an
IMsoDocExCancel interface. The add-in can use this interface to query whether a user
chooses to cancel a long document-export operation.
void GetOutputOption(
    MSODOCEXOPTION docexoption, 
    DWORD* pdwVal 
);
void SetOutputOption(
    MSODOCEXOPTION docexoption, 
    DWORD dwVal 
);
Microsoft Office Calls GetOutputOption Only with
msodocexOptionTargetDPIColor for Fixed-Format Add-
Ins
EnableCancel