Follow us on Twitter

Have a question on something? Visit the forum for help.

NEW!! LazyNetworkAdmin Forums! Click -> here

 

Print all txt files in a folder PDF Print E-mail

Need to print a lot of txt files quickly? Use this script and it will print all txt files from the folder of your choice to your default printer.

 ----------COPY EVERYTHING BELOW THIS LINE---------- 

'This script will print all txt files in a specified folder to your default printer
'Cheyenne Harden 12.4.06

On Error Resume Next

TargetFolder = inputbox("Enter the path to the files you would like to print.")
If TargetFolder > "" Then
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TargetFolder)
Set colItems = objFolder.Items
For Each objItem in colItems
    objItem.InvokeVerbEx("Print")
Next

Else
Wscript.Echo "No path was entered."
Wscript.Quit
End If

 

----------COPY EVERYTHING ABOVE THIS LINE----------

 

 

PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR SCRIPT!!!

To make this script work you will need one things!


1. You will need to have privlidges to the directory you would like to print from.


This information is provided "AS IS" with no warranties expressed or implied.




Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! TwitThis Joomla Free PHP
 
 

Sponsored Links