There are two ways to reproduce the crash:
1) Record a Macro that will Export a file to PSD with Transparency check set on in 'Convert To Bitmap' dialog.
Go to File -> Export a file to PSD and click export and set Transparency check set off in 'Convert To Bitmap' dialog.
Now run the macro. CorelDraw crashes.
2) Go to File -> Export a file to PSD and click export and set Transparency check set off in 'Convert To Bitmap' dialog.
Run the following script which sets the Transparency check on:
IVGStructExportOptionsPtr pVGStructExportOptionsPtr = m_pApp->CreateStructExportOptions(); pVGStructExportOptionsPtr->PutTransparent(VARIANT_TRUE); m_pApp->ActiveDocument->ExportEx( _T("C:\\Temp\\TestFile.psd"), cdrPSD, cdrAllPages, pVGStructExportOptionsPtr, nullptr ); pCorelExportFilterPtr->Finish();
CorelDraw crashes or exported file locked (with Transparency turned off)
Any Idea?
It wouldn't be the macro would it?
Once you go to File -> Export to PSD with Transparency turned off, running the macro will cause the crash.
Here is the macro with Transparency turned on:
Sub MacroTest() Dim expflt As ExportFilter Set expflt = ActiveDocument.ExportBitmap("C:\Temp\TestFile.psd", cdrPSD, cdrAllPages, cdrCMYKColorImage, 1255, 1678, 300, 300, cdrNoAntiAliasing, False, True, True, False, cdrCompressionNone) expflt.FinishEnd Sub