Select word from MS Word through VB.NET -



Select word from MS Word through VB.NET -

i want select specific word ms word through vb.net (microsoft.office.interop.word).

any thought how it?

edited: problem can not find/replace string more 255 symbols. that's why i'm trying find solution issue.

your question seems quite vague beginning, may proceed follows;

dim objword new word.application dim wordtofind string = "test" objword.visible = true 'open existing document. dim objdoc word.document = objword.documents.open("c:\folder\mydoc.doc") objdoc = objword.activedocument 'find word objdoc.content.find.execute(findtext:=wordtofind) ' perform process searched text 'close document objdoc.close() objdoc = nil objword.quit() objword= nil

hope helps!

vb.net ms-word office-interop

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -