Read text in Word
-
Hi ! I want to read the text shown inside a word document to a string variable. The problem is the normal appraoch FileInfo f = new FileInfo(loadedPage); StreamReader s = f.OpenText(); myvar = s.ToString(); which is used to read normal text files will not work with word. Thanx !
-
Hi ! I want to read the text shown inside a word document to a string variable. The problem is the normal appraoch FileInfo f = new FileInfo(loadedPage); StreamReader s = f.OpenText(); myvar = s.ToString(); which is used to read normal text files will not work with word. Thanx !
:rolleyes:Sorry to disappoint you but a word document contains format codes. Open it up using note pad and a you will understand. You need to save it as a text file. In addition, if you save word in rtf, you can open it up using the rtf control provided by MS. Hope this helps. Robocop Robocop