/coreldraw-vba-productivity-tools

A collection of VBA macros and functions to enhance productivity when using CorelDRAW

Primary LanguageVBAMIT LicenseMIT

GitHub stars GitHub forks GitHub watchers GitHub followers

CorelDRAW VBA Productivity Tools License: MIT

A collection of VBA macros and functions to enhance productivity when using CorelDRAW.

Features

SaveAndCleanup Module:

  • SaveAsLowerVersion function: Saves the active or specified CorelDRAW document as an earlier version format.
  • SaveAllAsLowerVersion sub: Saves all CorelDRAW documents in an active document's folder as an earlier version format.
  • SaveActiveDocAsLowerVersion sub: Saves the active CorelDRAW document as an earlier version format.
  • DeleteBackupFiles sub: Deletes all backup files of CorelDRAW documents in an active document's folder.

HelperFunctions Module:

  • DeleteFileToRecycleBin function: Deletes a specified file and sends it to the recycle bin.
  • FileExists function: Determines if a specified file exists.

Usage

  1. Copy the code for each module to the corresponding module in your CorelDRAW VBA project.
  2. Reference the Microsoft Scripting Runtime library in your project.
  3. Call the macros and functions as needed.

Example

To use the SaveAsLowerVersion function, run the following code:

SaveAsLowerVersion "C:\path\to\your\document.cdr", cdrVersion14

To use the SaveAllAsLowerVersion sub, run the following code:

SaveAllAsLowerVersion

To use the DeleteFileToRecycleBin function, run the following code:

DeleteFileToRecycleBin "C:\path\to\your\file.ext"

License

Distributed under the MIT license. See LICENSE for more information