Unable to delete pdf preset

Plese let me know how I can delete pdf preset already loaded.

myInDesign.ActiveDocument.Export “Adobe PDF”, savePDFPath, False, myInDesign.PDFExportPresets.Item(myPresetName)
Rem-myJavaScript=“var myPDFPreset = myInDesign.PDFExportPresets.Item(myPresetName); myPDFPreset.remove();”
Rem-myInDesign.DoScript myJavaScript, 1246973031

Regards,
Poo

Hi,

Try this:


tell application "Adobe InDesign CS3"
	launch
	set pepnames to name of every PDF export preset
end tell

if pepnames is {} then return

choose from list pepnames with prompt "Choose a PDF export preset to delete:" OK button name "Choose" cancel button name "Cancel" with title "PEPKiller" without multiple selections allowed and empty selection allowed

set usrchoice to result
if result is not false then
	set pepname to (item 1 of usrchoice as list) as text
	tell application "Adobe InDesign CS3"
		delete PDF export preset pepname
	end tell
end if