CorelDRAW / Excel VBA realtime communication

Hi everyone

I am new to CorelDRAW but have some experience in Excel and VBA.

What we are trying to do is do is batch create Vector images in Excel, unfortunately one by one, and then export them, one by one to CorelDRAW.

So the process works as follow: VBA routine creates a vector image in Excel based on information found in a cell.  The image is then copied to the clipboard.  Once copied a msgbox box pops up "Continue?".  I then switch to CorelDRAW where I run another VBA ruotine that takes the image from the clipboard and pastes it at a specific location and clears the clipboard. Again I receive a msgbox "Continue", then I switch back to Excel and repeat the process...

To this point I need to be involved in every intermittent process.  THIS is what I would like to automate.  Does anyone know how this can be done?

Is it possible to have both Excel and CorelDRAW do a test based on a condition of the clipboard? Something like, as long as the clipboard IS NOT empty, do not continue running Excel code, and as long as long as the clipboard IS empty do not run the CorelDRAW code?

Or any other type of real time communication?

  • Former Member
    0 Former Member over 7 years ago
    You can use OS Clipboard in your Excel and Corel, you can check if exit data and compare, check all methods https://msdn.microsoft.com/library/system.windows.clipboard(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2
  • you can do a lot easier - read the data directly from Excel cells and create vector image using this data. Without copy/paste to clipboard and switching to CorelDRAW. All this can be done from CorelDRAW. First you need to create an object "Excel.Application", then open .xls-file, read desired cells, draw subpaths and segments and finally close object. The Excel itself is not running, loading just small copy of Excel's object, which gives access to it methods and routines and allows access to the sheets and cells