inputFile = "input.pdf"
outputFile = "out.pdf"


DIM varReturn


Set objFSO = CreateObject("Scripting.FileSystemObject")


' Instantiate Object
Set TK = CreateObject("APToolkit.Object")


' OpenInputFile
varReturn = TK.OpenInputFile(inputFile)
If varReturn <> 0 Then
myError "TK: OpenInputFile Failed ", varReturn
End IF


' OpenOutputFile
varReturn = TK.OpenOutputFile(outputFile)
If varReturn <> 0 Then
myError "TK: OpenOutputFile Failed ", varReturn
End IF


Set oAnnotManager = TK.GetAnnotationManager()



'delete all annotations
'oAnnotManager.Delete 2, "All"



'comment or sticky note only
oAnnotManager.Delete 2, "text"



varReturn = TK.CopyForm(0,0)
If varReturn <> 1 Then
myError "TK: CopyForm Failed ", varReturn
End IF


TK.CloseOutputFile
TK.CloseInputFile
Set TK = Nothing


MsgBox "done"
'--------------END Test Case Specific------------------------------


Sub myError(method, errCode)
TK.CloseOutputFile
TK.CloseInputFile
set TK = Nothing
msgbox method & errCode
Wscript.Quit -1
End Sub