' *
' pptHtml.vbs
' *

Rem *** Script Directives ***
Rem On Error Resume Next

set WShell = WScript.CreateObject("WScript.Shell")
Rem dim version

Rem version = "0"

Rem nlist = array("8.0", "9.0", "10.0", "11.0", "12.0")
Rem for each n in nlist

Rem 	str = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\"& n &"\PowerPoint\InstallRoot\Path"
Rem 	lcValue = WShell.RegRead(str)

Rem 	if (lcValue <> "") Then
Rem 		version = n
Rem 	    lcValue = ""
Rem 	end if
Rem next

Set application = CreateObject("PowerPoint.Application")

Rem *** Variable Declarations ***

application.DisplayAlerts = 0
application.Options.VirusProtection = True

Set oArgs = WScript.Arguments
document = oArgs(0)
html = oArgs(1)

application.Presentations.Open document,0,0,0
Rem if (version = "10.0" or version="11.0" or version="12.0") Then
 	application.Presentations(1).SaveAs html,12
Rem else
Rem 	application.Presentations(1).SaveAs html,13
Rem end if


application.Presentations(1).Close

application.quit()
WScript.Quit

