WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Print Word DOC then move files/directory (Read 6281 times)
El Credito
YaBB Newbies
*
Offline



Posts: 4
Print Word DOC then move files/directory
Oct 4th, 2012 at 5:32pm
 
Hello. I'm checking out the trial currently. I'm trying to implement a way for a remote transcriptionist to sync Word .docs to a system in my office and have them automatically print. After printing is complete I'd like to have these files moved to an archive directory. I've got the printing set up but am wondering if I need to write a simple .bat file to move these over or if the best idea would be have files of a certain age moved to the archive.
I'm wondering also if there is any way to print to a printer that is not the default printer.
Additionally is there a DDE wordparm that I may use to make Word run/print in the background almost as a service?
This is a wonderful program! Just need a little help perfectly implementing what I'm trying to do.

Thanks in advance!
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Print Word DOC then move files/directory
Reply #1 - Oct 4th, 2012 at 5:54pm
 
Yes, File Age monitoring would do the trick (create a 2nd task).

However, if you know a little batch scripting you have complete control of the "Print Word" task. Just change the bat file started by WD.

This is explained for "Print PDF" in this blog, should be easy to do the same for "Print Word".
http://blog-en.gdpsoftware.com/2011/10/after-printing-pdf-i-want-to.html
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
El Credito
YaBB Newbies
*
Offline



Posts: 4
Re: Print Word DOC then move files/directory
Reply #2 - Oct 4th, 2012 at 8:14pm
 
Thanks so much for your quick response. I've created the 2nd task and used file ages monitoring to move files and sub directories to my archive and it's working wonderfully. I don't have the knowledge to append to the bat file after printing is done unless I can add a simple move command to the end. Do you think that may work?
I know WD uses the default printer but is there any way to use scripting to force printing on a network printer? Also is there anyway to hide Word while it prints so this process doesn't disturb the user of the PC? If not I'll just set up a schedule for after-hour printing.

Thanks again!

Chris
Back to top
 
 
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 658
South Germany
Re: Print Word DOC then move files/directory
Reply #3 - Oct 5th, 2012 at 8:53am
 
Word 2010 should be able to print some kind of "silenty".
Take a look here:
http://www.christowles.com/2011/04/microsoft-word-printing-from-command.html

You need some macro-code like described in the link above to switch the printer inside Word and than use the "run any .bat file" plugin in WatchDirectoryto start Word with that makro.

Another tipp you can find here:
http://www.robvanderwoude.com/commandlineswitches.php#Word


I have not tested it, but maybe it helps.


To move your file after printing just add
MOVE /Y "%WDFILE%" c:\archive
at the end of your .bat file.
Back to top
 

Viele Grüße / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
El Credito
YaBB Newbies
*
Offline



Posts: 4
Re: Print Word DOC then move files/directory
Reply #4 - Oct 5th, 2012 at 8:29pm
 
Thanks again for helping me out. I've gotten everything working except the move command in the bat file. Placed the command right at the bottom of the wd.bat located in my task's directory between the annotate & final goto eof. Looks like Word is still using the file by the time the bat gets to moving it because the move process fails giving the typical statement of file is being used by another process. I haven't written a bat in a while but will look into a way to delay the eof so I can move the file rather than using the file age method. I plan on posting next week on how all this worked out for me so it may help some others.

Thanks!!
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Print Word DOC then move files/directory
Reply #5 - Oct 6th, 2012 at 11:53am
 
Perhaps, just before you do the move enter this:

"%WD_INSTDIR%\GdPUtil.exe" -sleep 30

This will introduce a 30 second pause in your script.

WD_INSTDIR contains the directory where WD is installed (see http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html for other variables).
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
El Credito
YaBB Newbies
*
Offline



Posts: 4
Re: Print Word DOC then move files/directory
Reply #6 - Oct 8th, 2012 at 3:38pm
 
Perfect! That looks like a great utility you got there. Lots of functionality. That did the trick without having to create a second task. Thanks so much for all your help. I will get back here this week to post for other users to learn from this process. Thanks again!

Chris
Back to top
 
 
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 658
South Germany
Re: Print Word DOC then move files/directory
Reply #7 - Oct 8th, 2012 at 3:43pm
 
Thanks for letting us know. Word was blocking that file a few seconds longer, and the script allready want to move it.....
Back to top
 

Viele Grüße / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
Page Index Toggle Pages: 1