- #Why use adobe acrobat distiller how to#
- #Why use adobe acrobat distiller pdf#
- #Why use adobe acrobat distiller full#
- #Why use adobe acrobat distiller windows#
#Why use adobe acrobat distiller full#
To run the script, provide the full path to an Excel file on the command line: excelprint.vbs c:\Temp\Test.xlsx OReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue StrValueName = "C:\Program Files\Microsoft Office\Office14\excel.exe" If ((Right((A), 3) = "xls" OR Right((A), 4) = "xlsx") AND _įso.FileExists((A))) Thenĭir = fso.GetParentFolderName((A))īasename = fso.GetBaseName((A))Įxt = fso.GetExtensionName((A)) Set exl = CreateObject("Excel.Application")įor A = 0 To ( - 1) Set fso = CreateObject("Scripting.FileSystemObject") OReg.CreateKey HKEY_CURRENT_USER,strKeyPath ' Just in case, create the PrinterJobControl registry key. StrKeyPath = "SOFTWARE\Adobe\Acrobat Distiller\PrinterJobControl" & strComputer & "\root\default:StdRegProv")
#Why use adobe acrobat distiller pdf#
' Set registry key to control PDF output and print an Excel I’ve written a small VB Script sample that will take the path to one or more Excel files on the command line, and will print these files to the default printer after setting the registry key to specify the PDF output filename. We won’t get the full path, but just knowing the name of the executable will help to find the application. By clearing out all sub-keys in PrinterJobControl, we can make sure we know which application was last used to print. In the screen shot I’ve attached, you can see entry called “LastPDFPortFolder – wordpad.exe” – such an entry gets created every time an application prints to the Adobe PDF printer. In this case, you can use the registry editor to see which application is responsible for printing. Sometimes it’s not obvious which application is actually printing – you may be running one application, but in the background it is handing control over to the application that is handling the print process. You can see this by refreshing the view in the regedit application, but also by printing again from WordPad: This time, it will prompt for a PDF filename. This means that this key needs to be created before every print job that needs to be saved to PDF automatically. The other thing that will happen is that the key we just created gets removed. In the “Edit String” dialog set the value to c:\MyPDFFileName.pdf and click on OK.Īfter creating this registry key, print from WordPad and see how the file is printed without prompting for a filename. Once that is done, right-click on the new entry and select “Modify”. Then select New>String Value – this will actually create a new string value, and will open the name up for editing – change it to C:\Program Files\Windows NT\Accessories\wordpad.exe To do this in the regedit tool, navigate to the PrinterJobControl key and right-click in the pane that shows the key value pairs. Sounds more complicated than it actually is: To print from the WordPad application to a PDF file without begin prompted for the filename use the following key value pair:Ĭ:\Program Files\Windows NT\Accessories\wordpad.exe = c:\MyPDFFileName.pdf The documentation requires us to create a sub key – or a key value pair – where the key is the path to the application that wants to save a PDF file, and the value being the filename for the PDF file. If it does not exist, create it before we go any further (or, just print using the Adobe PDF printer). The registry key HKEY_CURRENT_USER\Software\Adobe\Acrobat Distiller\PrinterJobControl should already exist if you’ve printed to the Adobe PDF printer before. Here is the link to the page that describes this registry key process. The details can be found in the Acrobat SDK. In the olden days, it was necessary to first print to a PostScript file, and then call Distiller from your program to convert that PostScript file to PDF, but for quite some time now, Adobe provides a way to specify that PDF filename by setting a registry key. from an MS Office application using VBA), that step is quite annoying, and can ruin one’s day when trying to process 1000 files. However, if you want to programmatically create PDF files from your application (e.g. That is usually a good thing when you manually initiate the print operation, because then you know where your PDF file gets stored on the computer. Voila, a new PDF file is created – after the application asks you to specify the filename for the new PDF file. All you need to do is (that is, after you’ve installed Adobe Acrobat), select to print, then select the “Adobe PDF” printer, specify any job options, and print.
#Why use adobe acrobat distiller windows#
As you may know, the “Adobe PDF” printer allows you to create PDF files from any application on a Windows system that can print.
#Why use adobe acrobat distiller how to#
This is from the category “Frequently Asked Questions” – this time how to programmatically specify an output filename when printing to the Adobe PDF printer.