Hello, Would someone be able to help me out here? I use the following macro to automatically save a "Production" copy of the file, I am trying to adjust it to save the copy as coreldraw X6 (16) version, since i am using corel 2024 now but need to be able to work with the older version as well, I tried but can not figure it out. I will appreciate any help. Here is the code:
Sub Save_as_PRODUCTION() On Error Resume Next ' Enable error handling
Dim originalFileName As String Dim originalFilePath As String Dim productionFileName As String
' Get the original file name and path originalFileName = ActiveDocument.Name originalFilePath = ActiveDocument.FilePath
' Check if the document has been saved If originalFileName = "" Or originalFilePath = "" Then MsgBox "Please save the document before running this macro.", vbExclamation Exit Sub End If
' Create the production file name by adding "PRODUCTION" productionFileName = Replace(originalFileName, ".cdr", " (PRODUCTION).cdr", , , vbTextCompare)
' Confirm with the user before saving If MsgBox("Do you want to save a PRODUCTION copy of the document?", vbYesNo + vbQuestion, "Save PRODUCTION Copy") = vbNo Then Exit Sub End If
' Save a copy of the document with "PRODUCTION" added to the name ActiveDocument.SaveAs originalFilePath & "\" & productionFileName
' Check for errors during save If Err.Number <> 0 Then MsgBox "Error saving the PRODUCTION copy. Please check if the file is open elsewhere or if you have sufficient permissions.", vbCritical Else ' Inform the user about the successful save MsgBox "Production copy saved as: " & productionFileName, vbInformation End If
On Error GoTo 0 ' Disable error handlingEnd Sub
Neat... would something like that work to save to version 14 ??
The minimum version in which you can save a file does not depend on the program line SaveOptions.Version = 16but the version of CorelDraw you use can open/write the lowest version of the cdr file.