Simon wrote:
> I have a vbs (Visual Basic Script) file which needs to be executed from
> Java.
I'd recommend using ANT to control the workflow, not Java.
> The vbs file basically needs to read in a list of Word documents, where
> each document gets parsed and the individual data isconverted into
[quoted text clipped - 4 lines]
> have a Word document called 'test.doc' and when you open it it created
> a file called '$test'.
Check the Javadocs, or the source if it is available and check if there
is a way to designate the file name.
> To run the vbs using the following command 'cscript test.doc'.
Like I said. I'd recommend calling the VBS from ANT. Also, note that
ANT is
easily customizable and you could create a an ANT task that would call
or
execute your Java code.
> The problem is that it does not seem to finish looping through all the
> Word documents. So If I have 100 Word documents, it will only convert
[quoted text clipped - 5 lines]
> these $ files when it reads these Word documents?? Remember I've
> already tried the cscript.
I don't know why you think the problems have anything to do with $
files.
Why do you think that's the case?
I'd fathom that the problem is that the code you are using to parse the
Word document
is not compatible with a newer version of Word. In that case, the
solution is
to get an up-to-date Word parser.
You could look into writing a VBA pluggin with a sub that saves a Word
document
as XML. Then you could have Java parse the document as an XML file.