开发者

Embed Word document preview in WinForms app

How can I embed a word document in a form or usercontrol like the explorer preview panel does?

I found this topic and they say DSOFramer isn't available any more, but what should I use now? A third party tool is only acceptable if its free.

The only thing I noticed was that prevhost.exe starts a winword.exe process with the -Embedding command switch, but I can't find any开发者_如何学JAVA information on this switch.


Okay I found the solution, it was kinda obvious. I created a UserControl which accesses the IPreviewHandler from word like the windows explorer does and host the preview in my control. The CLSID I use is {84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}

You can use the Windows 7 API Code Pack for the interface declarations. I don't know if its offical supported by microsoft but for me it did the job.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜