Exporting the electronic file component such as a word document is different from exporting the image pages of a document. If you have not used Snapshot to generate image pages for your word documents or excel files, then no image pages will be present, and attempting to export these pages will result in an empty document.
Please read section of the SDK help files, Exporting a Document the SDK help files. The last section, Exporting the Electronic File associated with an Electronic Document, gives an example of exporting the electronic file component.
Two key points about exporting the electronic file:
- You do not set the PageFormat property when exporting an electronic file as PageFormat is used only to determine what format to export image pages in. The electronic file can only be exported in it's current format (docx, xslx, etc.).
- You use the ExportElecDoc method to export an electronic file rather than the ExportPages, which should only be used to export the image pages
You should be able to check whether your document has an electronic file component or not using Bert's code snippet, which checks the IsElectronicDocument properties. From there, you can use the appropriate method to export either the electronic file or the image pages.