开发者

Load word document content to PrintDocument

I have a .doc or .dot file and I'd like to view it in PrintPreviewDialog. I heard that I only can view it if I can load the 开发者_运维百科.doc content into PrintDocument object or atleast paint the content on.

Anyone know how to do it?

Thanks in advance


Microsoft Word is required to load the .doc and generate the preview image of document. Embedding Word in your own window used to be possible but support for this is rapidly disappearing. The old DsoFramer control used to be the standard solution but you can no longer download it. It got removed when the Office 2010 beta became available, an ominous sign. Embedding it in a WebBrowser might still be possible, not sure.

The long term solution is to use Word itself to generate the preview. Use the Document.PrintPreview() method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜