本文介绍了在Asp.Net中显示Word文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在asp.net中显示ms word文档,但是我希望以原始格式显示单词...带有空格和每行的方法应该在新行中显示
我试过这个但是它们之间没有空格
I want to display ms word document in asp.net, but I want to display word as it is in original format ... Means with spaces and each line should be dislplay in new line
I have tried this but their are no spaces between words
Microsoft.Office.Interop.Word.ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
string filePath = path;
object file = filePath;
object nullobj = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Open(ref file, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj);
Microsoft.Office.Interop.Word.Document doc1 = wordApp.ActiveDocument;
Range m_Content = doc1.Content.FormattedText;
Label3.Text =m_Content.text;
doc.Close(ref nullobj, ref nullobj, ref nullobj);
我的输出显示为
My Output is display as
Resume Name:-Raju Bhaiyyalal Khangare E-Mail id :[email protected] Contact no. :-8793166274 Carrier Objective:- To build my self in fast growing IT field & provide best of services to the organization, with hard work and skill which will take me to the pinnacle while contributing to the growth of the organization. Personal Skills:- Creative and positive mindset. Work with devotion and give my 100% at worktime. Efficient and effective in prioritizing work well under pressure . Educational Details:- Course University/Board Passing Year Percentage S.S.C. Pune Board 2007 72% H.S.C Pune Board 2009 74% B.C.A RTM Nagpur University 2012 47.11% M.C.A.-II RTM Nagpur University 2013 (Appeared) Computer Skills:- JAVA VB HTML Oracle MS-OFFICE 03/07 Windows vista/xp/07,Unix,DOS Curricular Activities:- UR of RCC college for 2 years Organized Gathering in RCC college Other Courses :- Done diploma in Core and Advance java programming Done diploma in VB Done diploma in computer application from RSMIT Personal Details:- Name :Raju Khangare Father’s Name :Bhaiyyalal Bhagwan Khangare Address :At post Saoner,Near Radheshyam Temple, Ward No.16 , Pahlepar Saoner,Dist.-Nagpr State- Maharashta Date Of Birth :22 october 1991 Gender :Male Nationality :Indian Language Known :Hindi,Marathi,English Hobbies :Chess ,Cricket, Music, travelling Declaration:- I here by declare that above mentioned information is true to the best of my knowledge. Date;- Raju khangare Place:-
Plz帮帮我。
Plz help me.
推荐答案
<iframe src="http://docs.google.com/gview?url=URL-TO-YOUR-DOC-FILE&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
只需将url查询字符串参数设置为您的Word doc文件,作为绝对URI和th at's it!
Just set "url" query string param to your Word doc file as an absolute URI and that's it!
这篇关于在Asp.Net中显示Word文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!