OLE String Parameters

Hi together,

I am doing a automatisation of CorelDraw from my C++ Application. This worked fine for many years with older Corel Versions up to X5, now I updated Corel  to CorelDraw2017 and since this update I get an Error in my c++ Application:

EOleSysError wih message "Typeconflict".

All wors fine so far except of passing strings in the parameters, they cause the conflict. Here is a code snipped, that creates a new document and should save it to disc:

Variant Corel = CreateOleObject("CorelDRAW.Application");
Corel.OlePropertySet("Visible", true);
Variant ActiveDocument =  Corel.OleFunction("CreateDocument");

UnicodeString CorelFileName = "C:\\temp\\test.cdr";
BSTR filename = SysAllocString(CorelFileName.w_str());
ActiveDocument.OleFunction("SaveAs", filename);

Is there anybody with the same problem or a solution?

I am using Rad Studio XE7, Windows 10, CorelDraw 2017

Thanks for help