hi,
i am a newbe in vb and i want to read a word file through vb
so i don't how to do it...
if you can please help me...
word application is the way but i want all the methods described in that
Printable View
hi,
i am a newbe in vb and i want to read a word file through vb
so i don't how to do it...
if you can please help me...
word application is the way but i want all the methods described in that
You can search the forum (see near Codeguru image, to the right:
user cp | register | calendar | members | f.a.q. | search |... and
click on search)
Or follow some links:
http://www.codeguru.com/forum/showth...highlight=word
hi
I want to open the word file. and I want to read text from it. How can I do it? What methods should I use?
What I want is that I need to read all the text in a string variable without any formatting and then search some stuff in it using RegExp.
vikas
Here an example on how to open it and get text.
(Warning: this example get document and make a copy
of it as plain text in same folder, with same name plus
a ".txt" at end of name of doc.
Ie: if you load c:\myDoc.Doc, you get also c:\myDoc.Doc.txt)
Plus it load the text in memory, and if TXT file is not too big,
shows it in a richtextBox.
hi,
thankyou Cimperiali...
for helping me in reading a doc file....
but by that way it is taking a lot of extra memory and hard disk space as i am storing the doc file in text format and then reading it...
if there is any direct way to read a doc file then please tell me
bye
vikas
Then you could
1)open ythe file for binary,
2)read all file in a variable (see cakkie sticky post)
3)strip all chars that are not valid (use replace. you will have to
match all non A-Zz-a0-9 plus spaces and chr 13 and chr10. There
could be some else you may want to save....)
4)open a file for output and print the resulting variable