我必须将PDF文件转换为数据库文件。 PDF文件具有Unicode子集字体。我使用代码格式将文件成功转换为文本文件。我在vb.net中使用了一个流阅读器。
如何通过阅读和替换字符来替换整个文件?完整的文件已编码,我想通过用指定的字符替换每个字符来解码它。我需要使用vb.net替换文本文件中的多个字符并以最快的方式替换,因为我需要在40,000个文件上执行此操作。
答案 0 :(得分:0)
我会使用word对象来声明文件并使用
With Selection.Find
.ClearFormatting
.Text = "hi"
.Replacement.ClearFormatting
.Replacement.Text = "hello"
.Execute Replace:=wdReplaceAll, Forward:=True, _
Wrap:=wdFindContinue
End With
.text
是您的Word文档中的文字,Replacement.Text
是您替换的文字。