Page 1 of 1

Getting information from a triggerfile.

Posted: Tue Apr 18, 2006 1:27 am
by cadmageren
One more newbie easy question:
Monitor folder for triggerfile.. *.go
If found: Rename to .. *.work
Triggerfile is a simple textfile and contains variables.
$sourcedoc = C:\master\input\FODAquote\Master\FODAquote.doc
$destination = C:\test.doc
...
Open $sourcedoc in Word.
Execute word macro within Word.
(The macro is saved in a seperate document.)
If macro succeeds, delete the triggerfile.
If macro fails, rename triggerfile to .. *.bad
 
Can someone please help me in the right direction. Thanks in advance.
/Michael Christoffersen

 

Getting information from a triggerfile.

Posted: Tue Apr 18, 2006 2:21 am
by Oleg
I haven't understood completely: what program must save the doc into destination?
If Word, then RoboTask can open source document only when *.go file is detected.
All another processing you can do in Word macro.

Recently we discussed how to extract the string from text. See here.

Getting information from a triggerfile.

Posted: Tue Apr 18, 2006 2:31 am
by cadmageren
Hi Oleg.
My macro should use the $destination variable, and create a new document, based on the sourcedocument.
(The go file also contains also contains many different field values, which is being merged into the new document, ie making a customised document)
I will have a look at the link u gave.
 

Getting information from a triggerfile.

Posted: Tue Apr 18, 2006 2:44 am
by cadmageren
Oleg - I have looked at the sample, but how do I get the name of the triggerfile?
 

Getting information from a triggerfile.

Posted: Tue Apr 18, 2006 3:00 am
by Oleg
Use the "File Monitor" event. This event can save a list of new or changed files into text files. See at the "Save changes" tab. You can use this file in the task body (e.g. "Text loop")