Most applications can print documents with commandline-parmeters.
If the application only uses DDE you need a short programm containing the
function "ShellExecute(..., "Print") or "PrintTo"
you can than setup a task in task planer to do the print job at night.