Sign in to follow this  
Followers 0
madmorgan

File Read Probelm.

7 posts in this topic

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.

Share this post


Link to post
Share on other sites



all the test.doc file has in it is

hello im a office 2003 test file.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

thanks for that URL and that word udf is ace it dos what i need grate thanks for the help.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0