I'm writing a PS CS5 VBScript that excecutes as a Macro from MS Excel, opens an image file, resizes it and saveforweb as PNG file. Everything seems to be working fine except when the scripts executes ExportDocument, it throws an error "Object doesn't support this property or method"
Set appRef = CreateObject("Photoshop.Application")
Set saveOptions = CreateObject("Photoshop.ExportOptionsSaveForWeb")
Set img = appRef.Open("c:\image.png")
saveOptions.Format = 13 'psPNGSave
saveOptions.PNG8 = True
saveOptions.Transparency = True
saveOptions.Dither = psNoDither
img.ResizeImage 620, 620
img.ExportDocument "c:\image2.png", 2, saveOptions
Any ideas where I might be going wrong .. ??
Found the problem.
It seems that the "ExportDocument" method has been changed to "Export" in CS5, but the documentions for CS5 as well a CS6 have not yet been updated to reflect this change.