madmorgan Posted February 25, 2010 Posted February 25, 2010 hello all, im want to read in a hole from from 0ffice 2003 but i get some wired out put not the text from teh file it shlef. here is the code im using. #include <file.au3> $file = ("C:\Users\John\Documents\test.doc") ;Office 2003 file Dim $read If Not _FileReadToArray($file,$read) Then MsgBox(4096,"Error","") Exit EndIf For $x = 1 to $read[0] Msgbox(0,"", $read[$x]) ;Shuld message out the hole text file. Next the out put im getting is like this : =\*,# now dos autoit suppoet office files??? if so were have i gone wrong?? all i wan to do is read in a hole file and then just output back out to a msgbox for now.
jvanegmond Posted February 25, 2010 Posted February 25, 2010 Try opening a .doc file with notepad and you'll see where you have gone wrong. github.com/jvanegmond
madmorgan Posted February 25, 2010 Author Posted February 25, 2010 all the test.doc file has in it is hello im a office 2003 test file.
jvanegmond Posted February 25, 2010 Posted February 25, 2010 Open it with notepad. github.com/jvanegmond
madmorgan Posted February 25, 2010 Author Posted February 25, 2010 when i open teh file with notepad it just a load of code nothing to amke any seance so i take it that autoit cant work with office 2003?
jvanegmond Posted February 25, 2010 Posted February 25, 2010 I said it only to point out that your used method makes no sense because a .doc file is a special file that's not readable like normal text.You need Word to read a doc file, because Word knows how to read this special .doc file. Searching the wiki or forum, we find this: http://www.autoitscript.com/forum/index.php?showtopic=30461. Good luck. github.com/jvanegmond
madmorgan Posted February 25, 2010 Author Posted February 25, 2010 thanks for that URL and that word udf is ace it dos what i need grate thanks for the help.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now