i want to use 2 macros, save as in lower version and convert to curve on 1 click is that possible?
Current subscription version (2025) allows you to save previous version w/o a macro.
I am not sure I correctly understand what you mean...
So, saying that you work in Corel 2022 and you firstly need to save the active workbook in X6 version and secondly do whatever related to conversion to curve, would it be a correct understanding? If so, it is simple to save in a previous version...
Then, „convert to curve” is a foggy request. I mean, what do you want converting to curve? You cannot convert to curve a document...
You need to specify. Something as „active shape”, all shapes from the active layer, all shapes from the active page, shapes being of a specific type (cdrRectangle, for instance) etc.. So, what do you want converting to curve?
Then, why are you talking about „using 2 macros”? Is this a real situation requirement, or you only want understanding how you can call a different function? Even so, would the second function being in the same workbook or in a different one? Would it be called with arguments? Should it return something? If not, why are you talking about a function and not a Sub?
Anyhow, this would be a code sample showing how to save As from 2022 in X6:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Sub Save_AS_Lower_version() Dim SOpts As StructSaveAsOptions Set SOpts = CreateStructSaveAsOptions With SOpts .EmbedVBAProject = False 'True .Filter = cdrCDR .IncludeCMXData = False .Range = cdrAllPages 'cdrCurrentPage .EmbedICCProfile = True .Version = cdrVersion16 .KeepAppearance = True End With ActiveDocument.SaveAs "C:\YourFolderName\Saved as X6.cdr", SOpts 'it overwrites existing, if the case... End Sub
For converting as curves:
1 2 3 4 5 6 7
Sub testConvertToCurves() Dim sh As Shape, shR As Shape, actL As ShapeRange 'Set sh = ActiveShape: sh.ConvertToCurves 'it works 'Set shR = ActiveSelection: shR.ConvertToCurves 'it works 'ActiveSelection.ConvertToCurves 'also works Set actL = ActiveLayer.Shapes.All: actL.ConvertToCurves 'for all active layer shapes End Sub
Related to calling a Sub from another GSM, place the next testing code in the GMS file where the first macro is (or place the single code line in the first macro. It will call a macro from `GlobalMacros`:
1 2 3
Sub callMacroFromGlobalMacros() Application.GMSManager.RunMacro "GlobalMacros", "Tests.MacroToBeCalled" End Sub
And the macro to be called (from GlobalMacros):
1 2 3 4
Sub MacroToBeCalled() MsgBox "I was called from another document/GMS...", vbCritical, "Calling from another document/GMS" 'ActiveSelection.ConvertToCurves End Sub
Hi Roy,
I think all versions are able to save in a previous version. Even, not tested... I did not make any macro in Corel for some years.
I am here after receiving a mail notification from you. I do not understand why, after being here, I received a message that according to my wish I will not receive notifications, anymore. I have no idea why...
Ionel,Great to hear from you! While saving to an older version has been available for long time, saving to a specific version *by default* was not an available option. Following is a snippet of item in Save options:I have no understanding about how/when/why we can occasional notifications from this group.
Thank you FaneDuru. It works. Actually i have to 100s of files to work on daily basis but maximum time my team forget to curve the file. now with this command i combine 2 macros and assign CTRL + S with this macro. Now when ever my staff save any of the file with CTRL + S. it curve entire document then save as in 16 version and close the document in 1 click. just to save time.