Hi Ronny (and anyone interested),
attached is the latest update of the FREE BDSwapImage macro. The latest version has built upon the QuickSwap module (select 2 images and then swap them with one click) by adding a QuickSwapSize module which not only swaps 2 images, but also swaps their sizes.The macro also has the original module SwapImage module which pops up a userform and allows the user to choose how the 2 images are swapped (e.g. swap the position of their top left corners, bottom right corners, etc). Here is a screen capture of how the modules appear in the Macro Manager docker, assign shortcut buttons/keystrokes to make them one click away:
Refer to the video below to see the intented use of this macro:
Brian said:.The macro also has the original module SwapImage module which pops up a userform and allows the user to choose how the 2 images are swapped (e.g. swap the position of their top left corners, bottom right corners, etc).
hi Brian,
Looks good. FWIW, this functionality has been in the commercial Dizzy shaping macro since 2007, and it also includes all alignment and transformation options. Plus much more...
Jeff Harrison said:FWIW, this functionality has been in the commercial Dizzy shaping macro since 2007, and it also includes all alignment and transformation options. Plus much more...
Hi.
Yes. That's one helluva macro. Very handy.
Do you guys use this image swap feature a lot?
-John
Brian said:... is an example of the "type of functionality" I want to see in a macro for CorelDraw.
I agree, I started something like this in the X3 era but only got the UI started.
Brian said:This can still be done in CorelDraw, but instead of coding to choose a different style set we have to manually code every parameter; in other words, manually create style sets ourselves.
Yes, I think I figured a way to do it, but the one downside is that it's not possible to tag inside a paragraph text frame. However, I like your word macro and totally agree with your vision.
Jeff Harrison said:but the one downside is that it's not possible to tag inside a paragraph text frame
Hi Jeff,
I am not sure what you mean by this. You can use CorelDraw styles within paragraphs (paragraph text boxes) as per my following video. About 2 years ago I figured out the code to create styles and edit styles, and apply them to selected text. I then started working on code to replace one style with another within a document. For some reason I was distracted with work or other things and never finished it, I didn't keep my test code either. Late last year I had another look at it and could not figure out what I had previously achieved. I will have another look at this in the near future as my "figuring out" skills have improved in recent times
Brian said:I am not sure what you mean by this. You can use CorelDraw styles within paragraphs (paragraph text boxes) as per my following video.
You can apply a style as you've shown, but the brick wall I ran into was that there's no way to externally-link styles to certain rows of text inside a paragraph text frame.
I've found a way otherwise however, for artistic text and such that I think will work.
Our goals are the same: I'm speaking of changing a style sheet and having the entire document change. AFAIK , only an entire p. text frame would change if a style sheet was updated, not specific words inside it. I think Ventura and probably ID can do that.
I will work on some code and then show you. It can be done. The style sheet will only work if the user has used styles to begin with, but this is how it works in all word processing/desktop publishing programs. For example, if you have not set a heading as a "heading 1", "main heading" or whatever...then CorelDraw does not know that it is a heading, just as Word doesn't. However, if it is set as a Heading 1 then it is not that difficult to write code to redefine what a Heading 1 is, etc. In some ways this makes it easier for us. The user only ever uses one set of styles and then the macro offers a choice of appearances for each of those styles. This is how the Word Style Sets work. They replace every Heading 1 with new attributes, every Heading 2 with new attributes, Body Text with new attributes, etc. I actually had this happening some time back and I am kicking myself for not keeping the code.
I know I can do this...I will get onto it ASAP. I am really glad we are both trying to achieve the same thing
Best regards,Brian.
Brian said:I know I can do this...I will get onto it ASAP. I am really glad we are both trying to achieve the same thing
Ok, cool. I'll be very surprised if you can pull it off inside a p. text frame... specifically, changing a style sheet and a range of text inside frame updating automatically...
DELETED: I deleted the contents of this post as the video was a little too large.
I am only one line of code away from cracking it with what we wish to do. The ONLY thing I cannot do is find the code to check what styles already exist in the document. I can write code to apply styles to individual paragraphs, and I can do things like: for paragraphs 1 to 5 apply style X, for paragraphs 6 to 10 apply style Y, etc. This alone is pretty useless, however, as we don't have the same number of headings and paragraphs in every document, of course. Once I figure the code to retrieve the active style from a paragraph - I am there, I can then write code to replace all text of one style with another, which will give the desired effect we are looking to achieve. e.g. code can run through the paragraphs finding a Heading1a and replace it with a Heading1b, find Heading2a and replace with Heading2b, etc. This will change the whole document with one click.
The following video is very simple. It first shows selecting a few paragraphs, one at a time, and applying a style to them via buttons. I then select several lines and apply a different style to them with another button. Finally, I use a single button to run through the whole text box applying a red style to every odd Paragraph and a blue style to every even Paragraph. The styles are identical in terms of font, font size and before/after spacing...I could have made the styles anything I liked. There is a hard return at the end of each line, thereby making each line a new "paragraph".
Please note the macro really is applying Styles to Paragraphs, it is not applying simple formatting to lines of text.
Brian said:The ONLY thing I cannot do is find the code to check what styles already exist in the document.
This is where my expertise comes in... ;-) We can chat privately about from this point if you are interested in collaborating, since I envision an affordable commercial macro for this eventually.