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:
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
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.
Last edited by Cimperiali; April 8th, 2004 at 07:30 AM.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
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
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
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.