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
Yes. This issue has not been resolved yet. Any suggestions?
Don't use the macro?
I am not using the macro. I am using automation - see my code above.
Well then don't use automation? Maybe the answer.
Sorry I have to.
There must be a fix for this issue.
The issue is not only occurring in automation.
It is happening with the macro as well, if you set the transparency on.
See my initial comment above.
Thanks for response.