Jump to content

File Read Probelm.


 Share

Recommended Posts

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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...