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

email - PHP mail error ... failed to open stream : permission denied -

sql server - SQL Query - Delete duplicates if more than 3 dups? -

c# 3.0 - Issue with getting 2 chars from string using indexer -