Software602 Home . products . download . support . register . how to buy . . view cart . . . contact us . . . .
Software602 Home . . . . . .
. .
.
.
Print2PDF 7.0 SE Home
.
Overview
.
What's New
.
Our Customers
.
Download Trial
.
Documentation
.
System Requirements
.
Licensing FAQ
.
Click here to compare Print2PDF editions
Questions? Contact Us
How to Buy, Purchasing
Print2PDF supports Microsoft Windows Vista, 64-bit (x64) and PDF/A
.

Customize Adobe PDF conversion from Microsoft Office (Word/Excel/PowerPoint) using Visual Basic Scripting (VBScript)

Print2PDF Server Edition and Print2PDF Conversion Server can be easily customized using Visual Basic Scripting (VBScript) to provide Adobe PDF conversion from Microsoft Office applications (Word, Excel, PowerPoint, Visio and Publisher). The integrated scripting engine allows anyone to quickly add custom logic into the PDF conversion process (e.g. mail merging, print comments, and more).

How the scripts work

The conversion engine is composed of multiple .vbs script files and one scripts.ini file that matches what file types will use what conversion script. All of these files can be opened and modified with a plain-text editor (e.g. Notepad). If you make any modification to these files, please make a backup copy of your work. Any future software upgrades will overwrite these files with the latest version.

Scripts Directory

Modifying the scripts

To add your custom code to a script, first open the scripts.ini file to see what script file you need to modify for the particular file type. Below is the description for Microsoft Word:

[Microsoft Word]
;Word 2000/2002/2003/2007
Script=Word.vbs
FileTypes=doc,docx,rtf,dot,dotx,dotm,wri,wpd
;ConversionTimeout=300

Open the Word.vbs file in your text editor and modify the code as needed. Below is an example of modifying the code to print the document properties from the Word document on the last page.

Word.vbs

Testing the scripts with Convert2PDF

After you have modified the script file you can test your results using the Convert2PDF application. Just launch Convert2PDF, select the file(s) and click Convert. Your custom code will be executed for each file in the conversion process. Below is an example of the printed Word document with the document properties printed on the last page.

Adobe Reader

2 Responses

  • Jerry posted on January 2nd, 2008 at 13:56

    Where are these scripts? Are they available if we are using Print2PDF Server Edition?
    Thanks,

    1
  • Software602 posted on January 3rd, 2008 at 11:23

    Scripts are located at:

    C:\Program Files\Software602\Print2PDF\Scripts

    Scripts are used with Print2PDF Conversion Server as well as with Print2PDF Server Edition

    If you use Print2PDF Server Edition use 7.0.07.1030 or newer build. We recommend using the latest build.

    2
.
.
  © 2008 Software602, Inc. All rights reserved.