View Single Post
  #12   Report Post  
Posted to microsoft.public.word.newusers
Srinivasulu B Srinivasulu B is offline
external usenet poster
 
Posts: 10
Default Making PDF files for large number of WORD Docs

Hi Mayaor,
It is working fine.... EXACTLY as it is expected to.
The only thing is that we should change the settings in Acrobat for target
directory.
It is at this point I goofed.
I came to know of it when I noticed that while doing some other printing job
on Excel, the out put PDF file i sgoing to the same directory.
That's how I could realise what is expteced to be done
Thanks a lot for the excellent macro you gave.
seena
"Graham Mayor" wrote in message
...
The following macro should work for all the documents in a selected
folder, subject your Acrobat settings.

Sub BatchPrintPDF()
On Error GoTo err_FolderContents
Dim FirstLoop As Boolean
Dim DocList As String
Dim DocDir As String
Dim sPrinter As String

With Dialogs(wdDialogCopyFile)
If .Display 0 Then
DocDir = .Directory
Else
MsgBox "Cancelled by User"
Exit Sub
End If
End With
If Documents.Count 0 Then
Documents.Close savechanges:=wdPromptToSaveChanges
End If
Application.ScreenUpdating = False
FirstLoop = True
If Left(DocDir, 1) = Chr(34) Then
DocDir = Mid(DocDir, 2, Len(DocDir) - 2)
End If
DocList = Dir$(DocDir & "*.doc")
Do While DocList ""
Documents.Open DocList
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = "Adobe PDF"
.DoNotSetAsSysDefault = True
.Execute
End With
ActiveDocument.PrintOut
ActivePrinter = sPrinter
ActiveDocument.Close savechanges:=wdDoNotSaveChanges
DocList = Dir$()
FirstLoop = False
Loop
Application.ScreenUpdating = True
ActivePrinter = sPrinter
Exit Sub
err_FolderContents:
MsgBox Err.Description
Exit Sub
ActivePrinter = sPrinter
End Sub


Srinivasulu B wrote:
Unfortunately it didn't
What's the way out ?
seena
"DeanH" wrote in message
...
In you orignal posting you did not say you wanted one file from 2,500
files.
;-)
If you use the Adobe, File, Create PDF, from Multiple Documents,
this will combine multiple files into one PDF. Also you have the
option to do this in
batches as there is an option to combine a new batch into an
extisting combined file.
Hope this helps
DeanH

"Srinivasulu B" wrote:

Thanks
It works...but a small catch.
It is craeting a single file for all the docuemnts selected
selected. But what I need one PDF file for one doc
Can you help me
However ...thanks again...for the timely help
seena
"DeanH" wrote in message
...
In you Conversion Settings take off "View Adobe PDF result" and
"Prompt for
Adobe PDF file name". You should then be able to go the Windows
Explorer
and
multi select many files, Roght Mouse click, Convert to PDF, and
this should
work OK. I am using Adobe 7 Pro and this works fine.
Also within Adobe 7 there is the option to File, Create PDF, From
multiple
files, that works well.
Maybe some else here may have a macro that will do this for you.
I probably would not do all 2,500 docs at one time! ;-)
Hope this helps
DeanH
"Srinivasulu B" wrote:

I have about 2500 docs.
Each is of one page.
I have to make a PDF for each of these docs...one PDF for each
doc. Now at this is what I have to do.
1. Open a doc.
2. Print it (to PDF)
3. Close it
Repeat the process.
Is there some kind of automated way of doing it
seena
PS
I am using Acrobat 8 for making PDF files