Error when saving in PDF with XP 64 bits

Hi I'm getting this error:

Automation error
The stub received bad data.

On that line :

boolstatus =swExportPDFData.SetSheets(swExportData_ExportSpecifiedSheets,varSheetName)

Under XP 64 bits, but under XP 32 bits everything is fine.

Help Please!
SolidworksApi macros