Hi All.
Does anyone know of a simple clipboard manager that supports .cdr objects. I've just been playing around with Ditto, but can't get it to support CorelDraw.Just want to be able to store multiple object/s on the clipboard without them being converted to a bitmap. Possible with text and bitmaps but is it possible with CorelDraw objects.
Anyone
Cheers
Sark
sark said: Does anyone know of a simple clipboard manager that supports .cdr objects. I've just been playing around with Ditto, but can't get it to support CorelDraw.Just want to be able to store multiple object/s on the clipboard without them being converted to a bitmap. Possible with text and bitmaps but is it possible with CorelDraw objects.
I know about clipboard managers that handle text and some types of images, and some other clipboard formats, but I am unaware of one that can save multiple clips of the full "custom data" that CorelDRAW can copy/paste. If you ever find out about such a clipboard manager, then please let us know!
You mention in another post that there are other ways of saving objects in Draw. I wrote a little bit of VBA code to make it easier to use one of those ways: storing the objects in CorelDRAW documents.
When run, this macro carries out a "Save As Copy" of the active document, including only the active selection. The filename is based on the name of the active document, and also adds a time stamp - e.g., "From MyDocument 2018-05-24 230256.cdr". In the current version of the macro, the folder path is specified as a constant.
The files that are created can then be imported into CorelDRAW documents using drag-and-drop from that folder. It's not exactly like copying/pasting, to the extent that the imported content comes in as a group.
VIDEO: Save Selection To Temporary
For recording that video, I used DeskPins to keep that folder in front of the CorelDRAW window. For CorelDRAW versions that have it, another alternative is to use the Connect docker to access the contents of that folder.
Eskimo.
That's very useful. CD12 has the Scrapbook Manager that is very similar. By dragging and dropping into the Scrapbook docker window you can save selections to a predetermined folder. You can then just drag selections from the Scrapbook window to the page when required.The only issue is that it uses a default icon and no visual preview. Each selection saved is named scrap1, scrap2 etc, so not even a name that relates to the object saved. It has its uses, and does save permanently, but not quite a clipboard manager.
Just got back off holiday. Have now been able to reassess the Scrapbook “Clipboard Manager” after some time away. Decided to go with the sequential number approach (Clip-1, Clip-2, Clip-3 etc). I opted for this partly because I couldn’t figure out how to change the time stamp to the commonly used (hh:mm:ss). I spent a lot of time on this. For some reason placing (:) between the hours, minutes and seconds killed functionality. I was just overwriting the previous selection. I can use other characters as separators but not the commonly used (:). Perhaps just a CD12 issue? Any thoughts on this?
I also added a UserForm splash screen to confirm copying, and hence negating the need for the Scrapbook docker to be open, but found it annoying so dropped it. I did add the automatic creation of a Scrapbook folder if not already created, which is useful.
If you’re still happy to post the UserForm code I would be grateful. The Scrapbook docker enables most of what’s required regarding managing folders, however, whilst I can create and save to a Scrapbook folder and later rename it to, say Scrapbook1, to save for future use. If later I want to add to that folder, I first have to change the default name of the current Scrapbook folder before renaming Scrapbook1 back to just Scrapbook (the hard code default). A simple method of changing the hard coded path would simplify this. With the added bonus of saving to any location.
Many thanks
sark said:If you’re still happy to post the UserForm code I would be grateful.
OK, here's a .ZIP archive that includes two plain text files. One is the code from my main module; the other is the code from the UserForm. It also include a .PDF file showing the naming of the controls on the UserForm.
JQ Save Selection as Copy (code).zip
In order to use the FileSystemObject stuff, Microsoft Scripting Runtime has to be referenced. I get using Tools>References in the VBA editor:
As discussed earlier in the thread, where I have used "SaveAsCopy", I think you will need to use "SaveAs". That's what I observed in X3.
Thanks for that Eskimo. I will see if it functions on CD12 tonight.
The "SaveAsCopy" discovery has been very useful. So, much online VBA info and code is Excell orientated. Changing Workbook to Document and the other obvious changes has not proved fruitful in the past, but by changing the SaveAsCopy to SaveAs has made even some of the Excell code adaptable.
Once up and running I'll try and upload to YouTube without the appalling playback quality I keep suffering from.
Thanks Again.
So. after some adjustments I got the UserForm appearing correctly. The latter three buttons behave as they should but, the most important “Choose Folder” does not appear to work.. It seems CD12 doesn’t support this method (see below screenshot). I’m not sure if typing the path in the textbox manually should also work, but I tried this with no success
Oh well, I’ll just have to do this manually with the hard coded version.
Just curious, did you ever implement this in CDX3. There’s no guarantee it would also work in CD12, but I would not have expected a big difference between the versions.
Edit.......I've uploaded the gms file just in case you assume correctly or otherwise, that I've missed something.
https://nofile.io/f/O52e1m2M5PG/SaveSelectionAs.zip
I went through the exercise of starting with the plain text files that I had provided, then using that to build it in X3.
After doing that, everything seems to work correctly in X3.
Here's the .GMS file:
JQ_SaveSelectionAsCopy_X3 _2018_06_28_1137.zip
When I looked at your .GMS file, I did not see my code there for initializing and terminating the userform. That would cause problems! When I tried it in X3, I just copied and pasted the entire text for the userform code.
Eskimo said:When I looked at your .GMS file, I did not see my code there for initializing and terminating the userform. That would cause problems! When I tried it in X3, I just copied and pasted the entire text for the userform code.
When I pasted as per your code the UserForm would not initialize. The changes I made solved this. I assumed this was just a version issue. I can only assume I have erred somewhere else when naming.
I'll give your .gms ago and see if this is a version issue, or something I'm failing to input correctly.
Thanks again.
When something like that doesn't work, then it may be time to add one or more break points and "step through" the code one step at a time to see where it fails.
The VBA editor has a number of tools to help with that sort of troubleshooting.
You may have already looked at these, but if not - one can learn a lot from Sub GDG_John( ) - GDG Macros VBA Lessons.
Well it seems this is a CD12 issue. I'm getting the same response from the .gms file you have working on CDX3.
If I use the initialise code with the heading in your txt file (Private Sub userform_initialize()), the userform opens, but with buttons two and three greyed out. Changing to the heading created by the userform (Private Sub txtFilePath_Click()), enables all four buttons, but in either method button 1 (Choose Folder) does not function (the others work fine). I’m getting the Object not supported error.
The line highlighted with error handling removed is as follows.
strTemp = CorelScriptTools.GetFolder(txtFilePath)
CD12’s VBA help shows support for the CorelScriptTools.GetFolder function, so I’m at a loss to target the issue. I appreciate there is little you can do to advise without CD12 installed. I'll try break points to see if there's another issue. If not I'll just have to change folders using the manual renaming method. This isn’t a huge hassle.
Really appreciate all your efforts. Without it I wouldn’t have got as far as I have with a usable .cdr “clipboard”.