Check CorelDRAW assembly version for .NET macro?

Right now my .NET macro is built for 17.6.0.1021, I found that if I load it into earlier version of CorelDRAW X7 it would outright crash the whole program.

Is there a way to check CorelDRAW DLL Assembly version so that it would prompt user to update their CorelDRAW? I'm thinking that I should do this within VBA before calling the DLL, but I haven't found out how.

Parents
No Data
Reply
  • In VBA this simple code returns Corel Version:

    You can use it in a corel Event...

    Debug.Print Application.Version
    

    You can check that using a VBScript:

    1
    2
    3
    4
    Dim Cor
    Set Cor = CreateObject("CorelDraw.Application")
    MsgBox "Corel " & Cor.Version, , "Corel Version"
    Set Cor = nothing
    

    Or directly in C# using Corel COM object or not. Using it in a similar way of VBScript or extracting from Registry the Corel.exe path and than the version of VGCore.dll in Assembly folder. Relatively easy...

Children