如何将.docx和.pdf转换为.txt文件

时间:2012-07-30 13:55:41

标签: vb.net docx

我正在处理一个应用程序,我需要将.docx和.pdf文件转换为.txt 具有基本格式的文件。我在互联网上搜索它但找不到任何免费的第三方dll。任何人都可以建议我最好的方式和一些dll参考。

先谢谢

2 个答案:

答案 0 :(得分:1)

http://support.microsoft.com/kb/316383描述了您想要对.docx文件做什么。 http://visualbasic.about.com/od/quicktips/qt/disppdf.htm描述了相同的内容,但使用的是.pdf文件。

将代码读入代码后,使用VB.NET的内置文件写入功能输出到txt文件。

答案 1 :(得分:0)

The code below will handle the job for you. It is something I wrote for the big boss haha. I hope it helps. The code reads the first cell in the work sheet as the folder where docx files are present and then converts them to txt files one by one saving in the same folder.

requests.get(url)