Process-dependent automatic opening of specific file in Word

  • Thread starter Thread starter Herbert Eppel
  • Start date Start date
H

Herbert Eppel

My Translation Memory software produces intermediate tab-delimited txt
files, which I open in MS Word (and temporarily convert to a table via a
macro) for reviewing purposes.

I wonder if there is some (relatively straightforward?) way of
implementing a procedure that would check whether txt export subprocess
is finished and then open the exported txt file in MS Word (and run the
conversion macro)?
 
Herbert Eppel said:
My Translation Memory software produces intermediate tab-delimited txt
files, which I open in MS Word (and temporarily convert to a table via a
macro) for reviewing purposes.

I wonder if there is some (relatively straightforward?) way of
implementing a procedure that would check whether txt export subprocess is
finished and then open the exported txt file in MS Word (and run the
conversion macro)?

The easiest method would be to put the translation command
into a batch file, followed by a command to open Word. Ask
in a Word newsgroup how to launch the conversion macro
automatically.
 
You could run it with a bat file, first line starts the translator, the
second line starts the word program when the translator program ends.
 
The easiest method would be to put the translation command
into a batch file, followed by a command to open Word. Ask
in a Word newsgroup how to launch the conversion macro
automatically.

Thanks (and to Bob) for your reply.

Am I right in assuming that the method you suggested would require the
translation program to close in order to trigger opening of Word?

I wasn't necessarily thinking of closing the translation program, but I
may try and pursue this further when I get back from holiday.
 
Herbert Eppel said:
Thanks (and to Bob) for your reply.

Am I right in assuming that the method you suggested would require the
translation program to close in order to trigger opening of Word?

I wasn't necessarily thinking of closing the translation program, but I
may try and pursue this further when I get back from holiday.

You could launch Word at any time you like, e.g. when the
translation program closes, or after a preset time delay, or
after the translation program has left a marker somewhere
to indicate that it has finished its job.
 
You could launch Word at any time you like, e.g. when the
translation program closes, or after a preset time delay, or
after the translation program has left a marker somewhere
to indicate that it has finished its job.

Thanks for your further reply.

The "after the translation program has left a marker somewhere" option
sounds promising :-) but I'm not sure how to go about it :-(

In my case, I suppose the marker would be the fact that the translation
program has overwritten (i.e. changed the size and date) an existing txt
file (although the file name is not always the same - it could be one
of, say up to 10 existing files).

If this isn't the right forum for trying to progress this further,
perhaps you could point me in the right direction?

Many thanks.
 
Herbert Eppel said:
Thanks for your further reply.

The "after the translation program has left a marker somewhere" option
sounds promising :-) but I'm not sure how to go about it :-(

In my case, I suppose the marker would be the fact that the translation
program has overwritten (i.e. changed the size and date) an existing txt
file (although the file name is not always the same - it could be one of,
say up to 10 existing files).

If this isn't the right forum for trying to progress this further, perhaps
you could point me in the right direction?

Many thanks.

We don't know your translation program and its capabilities,
hence it's impossible to give any specific advice. A good
solution would be for this program to write a semaphore file
when it has finished its job. A clumsy one would be to launch
Word only if the following two conditions are met:

a) Ten seconds have expired since the translation program
was started, and

b) None of the ten files you mention are currently open.
 
Back
Top