Multiple images export

When I''m designing in CorelDRAW (2017) I always end up grouping stuff together.
For example, I always design symbols in CorelDraw and group the individual objects in one group, so I can copy them and change the color.

Now rather than export each individual symbol (group), I really want a macro which exports each selected symbol (group) as a PNG file with the file name the same as the group name.
For example I have 5 symbols (groups) named: group1, group2, group3, group4, group5.
And when I select only the first 3, I want to run a macro that exports each of those groups as an individual png file with the groupname as the file name (group1.png, group2.png and group3.png).

So far I can loop through each selected group and get the name.
But now I need to export each of them as an image (png).

It seems I'm unable to do that.
I''m only able to export all the selected group as one single image.

I use the 'Shape' object (Visual Basic) for each of the groups.
Is there a way to export that 'Shape' object?

See my code below:

Parents
No Data
Reply
  • I've been using this macro for a while and love it. My only problem is that I would like to select the folder path of where export the objects get saved to, instead of opening the script and manually pasting the folder path into the code. I was looking at CorelScriptTools.GetFileBox method but was running into errors. Not sure how to add that feature into the code.

Children
  • I've been using this macro for a while and love it. My only problem is that I would like to select the folder path of where export the objects get saved to, instead of opening the script and manually pasting the folder path into the code. I was looking at CorelScriptTools.GetFileBox method but was running into errors. Not sure how to add that feature into the code.

    If you just want to get a folder path, then look at CorelScriptTools.GetFolder.

    That returns a string that you can then use when putting together the full file path for each file that is being saved.