TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:RE: Converting 1000s of files to PDF From:Michael LaRiviere <michael -dot- lariviere -at- ncompasslabs -dot- com> To:"'techwr-l -at- lists -dot- raycomm -dot- com'" <techwr-l -at- lists -dot- raycomm -dot- com> Date:Fri, 22 Oct 1999 09:23:44 -0700
>But here's the mind-numbing part: Windows prompts for the
>filenames for each of the postscript files! I would like to keep the
>same filename (just have the PS or even PRN extension). Does
>anyone know of how to automate this bit?
>
> - Michele
If you are using MS Word macros will work. The following macro searches a
folder for .Doc files and prints them to PostScript. You will need to change
the hard-coded print driver to match one of the print drivers on your
computer. I hope this helps.
(Note that as-is the macro will change your default print driver but it will
not undo the change when it is finished. Just remember to reset it
manually.)
Michael LaRiviere
michael -dot- lariviere -at- ncompasslabs -dot- com
Sub DOC2PS()
'
' DOC2PS Macro
'
' Tested on Word 97, WinNT4(sp5)
'
' This macro searches a target directory for DOC files and prints them to
' file (postscript) with a ".ps" appended to their filename. It uses
' the print driver named "default postscript driver".
'
'
Set fs = Application.FileSearch
With fs
' change location to suit your system
.LookIn = "C:\Docs\"
.FileName = "*.doc"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
' change printer name to match your system
ActivePrinter = "Default PostScript Printer"
For i = 1 To .FoundFiles.Count
' change location
ChangeFileOpenDirectory "C:\Docs\"
Dim currentDoc
Dim outputDoc