Can I save a document in Office XML AND XPS in the same file

Microsoft publisher Frequently asked questions

Can I save a document in Office XML AND XPS in the same file?

The better solution for most end-users is to install the converters on their pre-Office "12" machines to be able to open (and edit) these new-format files. Developers on top of Office, of course, have many more options.
At the technology level, the new Office XML formats allow other data, such as an XPS package to be included within the file. The Save as XPS feature is exposed through the Office object model, so you could, with a little code, generate the XPS (or PDF, for that matter) representation of a document and include it (more code) in the .docx or other roundtrippable file.
The resulting file wouldn't actually be an XPS file, and so likely wouldn't be recognized by the viewer, so you would also need some code on the reading side to extract the fixed format representation.


Comments