ms word - C# WPF Open File and edit certain text -


So let's say I've got just a text box and an OK button. He also wants to word the user types, and when he is OK, then it opens a particular file called Test.doc and CTRL + F for the words "test" and in the text box user Changed it has been entered. How can I open a word with the user's defined word and change the examples of word test?

The format of the document, you can actually use the following for any type of file: < / p>

  var content = Sistmkiokfailkreadalltest (@ "C: \ Maydokdo"); Content = content Change ("Test", "Test"); System.IO.File.WriteAllText (@ "C: \ myDoc.doc", content);  

The best way is to use the MS Office Interop Library.

Andrew


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -