I have created an Access DB to do mass conversions of MS
Word and MS PowerPoint files to Adobe Acrobat PDF files.
It is working, but when it queues more than 3 files it
causes my Win98 PC to freeze.
Let me briefly explain what I am automating and how:
1) A Folder has MS Word or PowerPoint files in it to be
converted to Acrobat PDF. Each type has its own folder,
and in that folder there are two subfolders - one
called "Processed" (where the orignal files are placed
after they have been converted) and one
called "PDFOutputs" (where the converted PDF files are
placed).
2) The Database is opened, which opens an autoexec form
(the DB Window is hidden from the user). The user selects
which type of conversion they want done (either Word or
PowerPoint), which opens another form where the actual
automation occurs.
3) Two default folders are listed in text boxes (where the
Source files are and where the Acrobat Distiller converted
files are outputted to). These are in text boxes to
facilitate if they needed to be changed on-the-fly (for
some odd reason). The Destination folder is not where the
files will end up however, they are taken from Distiller's
folder and placed into a subfolder in the Source folder
(mentioned above as the "PDFOutput" folder).
4) Well, now to the VBA processes. The VBA uses OLE to do
the following:
- start up Word (or PowerPoint),
- open the specific Word or PowerPoint file,
- change the ".ActivePrinter" to "Acrobat Distiller",
- print the file to the Distiller Printer,
- close the file,
- copy the Source file to the "Processed" folder,
- delete the Source file from the Source folder,
- copy the Distiller PDF file from the Destination folder
to the "PDFOutput" folder,
- delete the Distiller Destination file,
- move to the next file in the Source folder.
5) The program works, but it hangs (freezes) when there
are more than 3 files sent to the Distiller Printer
(whether this is an issue with Distiller or Win98 Printer
Queues or MS Word I do not know). Thus, I need a way to
either check the status of the Distiller process, or a
timer which waits a set amount of time. Now I'd like to
check the status of Distiller, but I noticed an issue with
Task Manager in that it lists AcroDist as active even when
the process has finished (I only know this by watching the
Task Manager using CTRL-ALT-DEL and AcroDist still appears
even when the Acrobat emblem is out of the System Tray and
the process has finished).
6) However, I placed a Message Box to appear before the
files are copied and/or deleted asking the User to make
sure that the Acrobat symbol appears and then disappears
in the System Tray before clicking OK. This solved the
problem, but I need the final solution to not require user
intervention for each file. Thus, I need a way to check
the status of the AcroDist process. Can anyone help with
this???
I would appreciate any help with this, as I have been
unfruitful looking online and in some books that we have.
Thanks in advance,
Colin
PS -- You can also reach me at colin chase at hotmail dot
com.