Need help finding a script.
Does anyone know of a place to find one or can give me a script that would print all documents in a specific location and include the file name in it? I need to print like 5000 documents, mostly 1 page Word docs including excel files. Don't ask me why, it's complicated...
Or is there a program that can do this already?
Or is there a program that can do this already?
Comments
-
Claymoore Member Posts: 1,637Are you trying to print all of the documents or just a list of the documents in that location?
-
Luckycharms Member Posts: 267Depending on the answer to that question and time restraints.. I might be able to come up with something... assuming you are running an os that runs VBscript...The quality of a book is never equated to the number of words it contains. -- And neither should be a man by the number of certifications or degree's he has earned.
-
Zoomer Member Posts: 126Just all the documents in a single location. There's like 2500 in one location and another 2500 or so in another. I just need to print them out and have a little tag on the bottom of the doc showing the file name. Running on Windows XP/Server 2003
-
Luckycharms Member Posts: 267Do you need it to print to your local default printer or... another printer??? ( easier if you print it to you local default...)The quality of a book is never equated to the number of words it contains. -- And neither should be a man by the number of certifications or degree's he has earned.
-
Luckycharms Member Posts: 267Ok first off I am not responsable for anything this does... ( TEST IT FIRST on a small Directory)
What you need to do...
first open a notpad ...
Second copy all code into notpad... ( change the Targetfolder to the folder you want printed)
Third save the file as print.vbs
Fourth double click icon and prepare to print....
Report any problems you might have... I tested but only on a folder with 5 files... ( if you need me to change it so that it outputs a file tell you what files have printed I can do that too...'/===================================== '/ Created By: Lucky '/ '/ Description: Print all files in folder '/ '/====================================== TargetFolder = "C:\Temp" ' This is the searched/printed Directory.... Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(TargetFolder) Set colItems = objFolder.Items For i = 0 to colItems.Count - 1 colItems.Item(i).InvokeVerbEx("Print") Next
The quality of a book is never equated to the number of words it contains. -- And neither should be a man by the number of certifications or degree's he has earned. -
Zoomer Member Posts: 126That worked great! Is there any possible way to get the filename on the bottom of the documents? Thanks for the script!!
-
Luckycharms Member Posts: 267It should have printed on the top of each page... did it not???The quality of a book is never equated to the number of words it contains. -- And neither should be a man by the number of certifications or degree's he has earned.
-
astorrs Member Posts: 3,139 ■■■■■■□□□□Here you go (with filename at the bottom and building off lucky's):' This is the searched/printed directory - no trailing slash
TargetFolder = "C:\temp"
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TargetFolder)
For Each strFileName in objFolder.Items
Set objDoc = objWord.Documents.Open(TargetFolder & "\" & objFolder.GetDetailsOf(strFileName, 0))
Set objRange = objDoc.Sections(1).Footers(1).Range
Set objField = objDoc.Fields.Add(objRange, 29)
objDoc.PrintOut()
objDoc.Close Flase
Next
objWord.Quit -
Luckycharms Member Posts: 267Sorry didn't read your post correctly.... As for printing the file name on the bottom rather then the top... I am pretty sure you can go into your default printer settings and change that... As for the script doing it.. I am not actually telling it to print the file name...( it does it by default.) Hope that helps...
--- or you can do that...---The quality of a book is never equated to the number of words it contains. -- And neither should be a man by the number of certifications or degree's he has earned.