@ECHO OFF ECHO. IF NOT "%OS%"=="Windows_NT" GOTO Syntax SETLOCAL IF "%~1"=="" GOTO Syntax IF NOT "%~2"=="" GOTO Syntax SET Ext=%~x1 SET Ext=%Ext:~1,3% IF /I NOT "%Ext%"=="PPT" GOTO Syntax IF NOT EXIST "%~1" GOTO Syntax SET PptProg= IF EXIST "C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE" ( SET PptProg="C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE" /S SET PrgDesc=PowerPoint Viewer 2003 ) IF EXIST "C:\Program Files\Microsoft Office\Office12\PPTVIEW.EXE" ( SET PptProg="C:\Program Files\Microsoft Office\Office12\PPTVIEW.EXE" /S SET PrgDesc=PowerPoint Viewer 2007 ) IF EXIST "C:\Program Files\Microsoft Office\Office11\POWERPNT.EXE" ( SET PptProg="C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE" SET PrgDesc=PowerPoint 2003 ) IF EXIST "C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE" ( SET PptProg="C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE" SET PrgDesc=PowerPoint 2007 ) IF NOT DEFINED PptProg GOTO Syntax ECHO Using Microsoft Office %PrgDesc% to print "%~1" START "PowerPoint" %PptProg% /P "%~1" ENDLOCAL GOTO:EOF :Syntax ECHO PrintPPT.bat, Version 1.00 for Windows NT 4 and later ECHO Open a print dialog for the specified PowerPoint file ECHO. ECHO Usage: PRINTPPT powerpoint_file ECHO. ECHO Where: powerpoint_file is the PowerPoint file to be printed ECHO. ECHO Note: This batch file requires either PowerPoint ECHO or PowerPoint Viewer, Version 2003 or 2007 ECHO. ECHO More info on PowerPoint command line switches: ECHO http://office.microsoft.com/en-us/powerpoint/HA101538891033.aspx ECHO http://support.microsoft.com/kb/830040 ECHO. ECHO Written by Rob van der Woude ECHO http://www.robvanderwoude.com IF "%OS%"=="Windows_NT" ENDLOCAL IF "%OS%"=="Windows_NT" EXIT /B 1