开发者

How to get a reference to MS-Word file specific paragraphs and display(must retain align,color,style)it in the C#.Net(4.0) Winform Application?

开发者 https://www.devze.com 2023-03-08 02:09 出处:网络
I have C#.net windows form based application.User have to entered the MS-Word File Paragraphs.Now i want to show that paragraphs in to right hand side with retain original structure that are contained

I have C#.net windows form based application.User have to entered the MS-Word File Paragraphs.Now i want to show that paragraphs in to right hand side with retain original structure that are contained in the MS-Word File.

For Example,

In Word file, my paragraphs having justify alignment,BOLD,back color,fore color,underline and also all of the Word function开发者_如何学编程alities.So, I want to retain these structure and display it in the Windows Form...

Please guide me to get out of this issue...


Short of embedded the Word window into your app (via win api SETPARENT tricks, most definitely a non-trivial exercise), about the only thing you might do is COPY the relevant paragraphs to the clipboard in RTF format, and host an RTF control in your app, then PASTE that info into that control. It might not be 100% of the formatting but it should hit most of the important bits.

0

精彩评论

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