如何将ms word文档转换为字符串进行显示 [英] how to convert the ms word document to string to display

查看:147
本文介绍了如何将ms word文档转换为字符串进行显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生,

i将读取ms word文件,我想在文本框中显示。

Dear Sir,
i will read the ms word file and i want to display in the text box .

推荐答案

所有你需要的要做的是阅读 Range.Text [< a href =http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.range.text.ASPX\"target =_ blanktitle =New Window> ^ ]属性 Document.Content 段落 Table.Cells 依此类推......



请参考以下链接:

Documents.Open()方法 [ ^ ]

如何:O笔现有文件 [ ^ ]

使用文档中的文本 [ ^ ]

如何:以编程方式将文本插入Word文档 [ ^ ]

< a href =http://msdn.microsoft.com/en-us/library/vstudio/f1f367bx.aspx>如何:以编程方式搜索和替换文档中的文本 [ ^ ]

如何:以编程方式重置Word文档中的范围 [ ^ ]



我建议你不要将MS Word文档(文本)的内容显示到单个文本框中......
All you need to do is to read Range.Text[^] property for Document.Content, Paragraph, Table.Cells and so on...

Please, refer below links:
Documents.Open() method[^]
How to: Open Existing Documents[^]
Working with Text in Documents[^]
How to: Programmatically Insert Text into Word Documents[^]
How to: Programmatically Search for and Replace Text in Documents[^]
How to: Programmatically Reset Ranges in Word Documents[^]

I would suggest you to NOT "display" the content of MS Word document (text) into single textbox...


这篇关于如何将ms word文档转换为字符串进行显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆