PPT2HTML "hooks"

There's simply no way we can add all the features our PPT2HTML users would like us to.

We do our best to add often-requested features, but we also let you add your own new features with PPT2HTML's "hooks".

Hooks let you tell PPT2HTML to run programs at several points while PPT2HTML is converting your PPT files to HTML. You can choose to run external programs and batch files:

To cause a program to run at any of these points, you supply the name of the program and any necessary commandline parameters in the [PPT2HTML] section of the PPTools.INI file

[PPT2HTML]
; Just before PPT2HTML reads the html template:
HookPreTemplate= commandline
:Just before PPT2HTML starts to generate HTML for a presentation
HookPreHTML= commandline
;Just before PPT2HTML generates HTML for each slide in the presentation
HookPreSlide= commandline
;Just after PPT2HTML has generated HTML for each slide
HookPostSlide= commandline
;After all HTML and image files have been generated
HookPostHTML= commandline

The ability to run a particular program is useful, but it's a lot better when you can specify a file or files for the program to work with, input and/or output folders and so on. PPT2HTML lets you pass the names of files and folders it's using off to the external programs you hook into.

PPT2HTML will look for special parameters and substitute real values, as shown in the table below.

For example, you might use something like

HookPostHTML=RENAME.BAT %outputfolder %basename

to launch a batch file, RENAME.BAT that renames all the files in your output folder from basename to some other name.

Type Parameter Example Replaced with
PPT file %sfullname C:\My Documents\MyFile.PPT Fully pathed name of presentation PPT2HTML is currently converting
  %sdrive C: Drive letter portion of full presentation path
  %sdir \My Documents\ Directory portion of full presentation path, including backslashes
  %sname MyFile Presentation file name w/o extension
  %sext PPT Extension part of presentation name
HTML file %hfullname C:\OutputFolder\Slide001.htm Fully pathed name of current HTML file
  %hdrive C: Drive letter portion of full HTML file path
  %hdir \OutputFolder\ Directory portion of full HTML file path, including backslashes
  %hname Slide001 HTML file name w/o extension
  %hext htm Extension part of HTML file name
Image file %ifullname C:\OutputFolder\Slide001.jpg Fully pathed name of current image file
  %idrive C: Drive letter portion of full image file path
  %idir \OutputFolder\ Directory portion of full image file path, including backslashes
  %iname Slide001 Image file name w/o extension (note that this is the same as the HTML file name w/o extension)
  %iext jpg Extension part of image file name
Template file %tfullname C:\Program Files\RnR\PPToolsV2\Basic.htm Fully pathed name of current template file
  %tdrive C: Drive letter portion of full template file path
  %tdir \Program Files\RnR\PPToolsV2\ Directory portion of full template file path, including backslashes
  %tname Basic Template file name w/o extension
  %text htm Extension part of template file name
Misc %basename Slide Basename from Preferences dialog (the "Slide" in "Slide001.htm" etc.)
  %outputfolder \OutputFolder\ Output folder
  %pptoolsfolder C:\Program Files\RnR\PPToolsV2\ PPTools Folder

Some of these values are undefined at certain hook points during the conversion process. For example, until PPT2HTML has begun converting Slide 1 to HTML, it can't supply valid values for the HTML or Image file replacement parameters that change from slide to slide (name and fullname) but it can supply those that don't change from one slide to the next: (drive, directory and extension).

The PPT file and Template file parameters are all valid at any hook point.

Supercharge your PPT Productivity with PPTools


Content authoring & site maintenance by

Friday - The Automatic FAQ Maker