View
All
CorelDRAW :: VBA macros :: wOxxOm RSS
Atom
English EN
Pycckue RU

RecentFiles--Nov30
beta: RecentFiles--Dec12

Nov,30: (important fix) images were locked by RF due to info display so file write access was prohibited
Nov,21: New: show more info for images, and PDF
Nov,11: (fix) ignore '..' parent folder on file delete

RecentFiles. The Unlimited
  • Automatically keeps an unlimited history of 10000+ Opened and Saved-As documents
  • File control with fast searching, thumbnail previews for CorelDRAW documents and images
  • Windows shell copy/move support, drag'n'drop.
shot_RecentCDR.png

  • Works with CorelDraw 11, 12, X3, X4
  • Thumbnail preview (right click to resize). CDR: version, file size, date modified. ALL graphics files (also pdf, ai, ps): mostly showed instantly, click thumbnail once to try to fetch high quality image for tif/jpg/ps/pdf/eps/ai
  • CDRinfo+ (option) shows number of pages, page size, dpi, fonts, bitmaps info (right-click info area to change page units)
  • folders pane (option) with resizable thumbnail, subfolder preview for folders on single-click
  • Favorite folders management
  • FastSearch & on-screen sorting
  • SaveAs mode with Notes/Keywords editing (click ©), default version, etc.
  • Behaviour options: AutoClose, AutoMinimize, AutoPopup (when no docs opened - option)
  • LastActiveView is saved inside document and is restored on next open so you resume on exact place you left it before
  • Autotagging imported by recentFiles bitmaps with bitmap name or/and path (see Options) that will be shown in statusbar & ObjectManager
    LocateImg-button to locate on disk previously tagged-imported bitmap.
    Alt-click LocateImg button to search selected file in current document's tagged bitmaps
  • deleting from list, deleting to recycle bin, cleanup of non-existing files buttons, renaming of files on disk automatically synchronizes names in history and vice versa, import & open of multiple files at once (drag'n'dropping supported)
  • automatic extraction of jpegs into CorelDraw document out of camera-raw .CRW & .NEF on drag'n'drop
  • Two splitters for resizing folders area and favorites area, keyboard control

Needs MSCOMCTL.OCX which is (re)installed with MSOffice
Recent files list: %appData%\Corel\recentFiles.ini, Settings of RF: %appData%\Corel\recentFilesOptions.ini

  • Nov21 - show W x H x color @ dpi (real world size) info for images, # of frames for GIF/TIF, mediabox (paper size) and number of pages for PDF
  • Nov11 - Important! Handling of '..' parent folder on file delete
  • Sep19 - don't remember, some fixes
  • July03 - Importing via RF - mouse click to set X/Y position or <Space> to keep embedded (useful for vector formats) or <Enter> to force page center.
    import 'PSInterpreted' :: save user's answer and keep it for all selected
    folder in saveAs mode is remembered for new files
    Ghostscript dll path in Options
  • Jun10 - PDF, PS, AI, PRN, EPS thumbnails displayed. GhostScript is required for most part
  • May31 - SaveAs mode: doubleclick a file in folderpane to save into (overwrite warning displayed)
  • Mar29 - fixed no-show of CDRinfo+ when enabled. Fixed viewmode change if macro is invoked by AltF1.
    New feature:
    when launched by keyboard shortcut the macro remembers it so next time you press it INSIDE the macro window the shortcut closes the macro
wx_Tools [at macromonster.com]

2008 Apr,21: upd: sizePagetoFIT - all/active page toggle
2008 Mar,01: Select Inside
2007 Nov,28: Bitmaps Resizer

wx_TOOLS macros package

Select

  • wx.InvertSelection - invert shapes selection
  • wx.PClipPick - pick a powerclipped shape(s) without entering powerclip editing mode.
    Works with keyboard assignment only: for example assign both "W" and "Shift-W" (to add to selection).
    Repeat the macro to pick nested shapes.
  • wx.selectInside 2008 Mar,1: all the objects inside a big one will be selected.
    1. select a lot of small shapes,
    2. run the macro,
    3. click some big shape (not in Wireframe view)
  • wx.selectComplexCurves - to find shapes with number of nodes greater than specified
  • wx.selectSmallObjects - select objects smaller than user specified threshold
  • wx.selectSameFillColor, wx.selectSameFillAndOutline, wx.selectSameOutline, wx.selectSameDialog
    To select same color filled/outlined shapes (ungroupped)
    Tip: enable keyboard ScrollLock led to specify sensitivity (negative: '-1' etc - to find shapes inside groups as well)
    images/sameColorSelect.png

Create

  • wx.CreateFountain
    Q
    uickly create complex fountain fills out of bunch of multicolored rectangles, preserving relative spacing
    1. make a few uniformly filled shapes (rectangles/circles), paint them
    2. select those, and invoke wx.CreateFountain
    3. pick the target shape
    Tip: use EyeDropper tool to pick colors from bitmap and then Shift-click to fill the next rectangle (duplicate as many rectangles as needed before).

    images/tip_CreateFountain.png
  • wx.transparentEdge
    create feathered edges for simple shapes.
    Note: sometimes a shape must have an outline for the macro to work correctly ('Fix' button)

    images/smallEdge.jpg images/shot_TransparentEdge.png

Preflight

  • wx.ConvertShapesToCMYK - converts shapes and bitmaps to CMYK
    (selected/whole doc)
  • wx.TextToCurves - text to curves
    (selected/whole doc, incl. powerclips)
  • wx.OverprintsRemove - remove all overprints
    (selected/whole doc, including overprinted bitmaps)

Bitmaps

  • wx.BitmapsDownsample - conditionally resamples bitmaps
    Smart enough to skip bitmaps with dpi larger than the 120% of user specified value
    (selected/whole doc, incl. powerclips. Shows per page statistics)
  • wx.BitmapsResizer - to change bitmaps size proportionally or fixed
    (all/page/selected, optionally incl. powerclips)
  • wx.BitmapsSetDPI - changes dpi value for bitmaps without resampling.
    (selected/whole doc, incl. powerclips. Shows per page statistics.)
  • wx.BitmapsToPowerclips - puts bitmaps into powerclips
    (Asks bleed # and processes selected / whole doc. Shows per page statistics.)

Outline

  • wx.OutlinesToQ_KillEmpty - converts outlines to curves and deletes original shapes
    the original shape is preserved if any of these conditions are present:
    fill, text-wrap, powerclip, effects, meshfill
  • wx.outlineBehind - set outline behind. Shift-click for 'normal' (also Ctrl-click)
  • wx.outlineCorners - set corners to rounded, Ctrl-click: miter, Shift-click: bevel'd
  • wx.OutlineIncrease & OutlineDecrease - change selected shapes' outlines width.
    Each width is changed individually which allows changing of different widths in one selection.
    I have it on Ctrl-Alt-Up & Down
  • wx.OutlineEqualsFill - makes outline color equal to fill.
    Useful for trace results in X3 to eliminate faint ghostly 'outline'.

Do it fast

  • wx.ForEach - repeat transformation individually for the selection
    1. apply any standard transformation repeatable with Ctrl-R to one object
    2. select any number of shapes
    3. run wx.ForEach
  • wx.PasteAtMouse - paste the clipboard at mouse position.
    Assign to hotkey only (Ctrl-Shift-V)
  • wx.GuideHorizontal, GuideVertical - create guide at mouse cursor.
    Assign to a hotkey only
  • wx.BlendSplit - instantly splits blend
    1. Put the mouse pointer over an intermediate shape in your blend group
    2. Invoke via hotkey only (mine is "Z") wx.BlendSplit macro

Page

  • wx.sizePagetoFIT - resizes page to fit objects + user specified gap
  • wx.pageNamesAsNumbers - remove page names ("Page #") so that only numbers remain.
  • wx.dupOnNextPage - quick copying of selection to the next page (no clipboard usage). Layers currently are merged.

Zoom

  • wx.ZoomOutBack - to replace F3 hotkey
    restores old pre-X3 behaviour - view goes to last used zoom when being invoked after zooming in. Especially handy when switching between extremely differing zoom levels.
  • wx.ZoomFullPage - to replace Shift-F4 hotkey, zoom to page + 5%
    (whereas standard DRAW behaviour is to add 20% thus wasting space)
  • wx.ScrollScreenDown, ...Up ...Left ...Right ...DownRight ...UpRight ...DownLeft ...UpLeft
    Scroll by 80% of screen. Assign e.g. to Ctrl-Alt-Numpad keys (1 to 9)
DRAW X4 fixes
• TIF export fix - DRAW X4 to Photoshop CS3

This macro automatically fixes DRAW X4 export routine so that it will create TIF files compatible with Photoshop CS3

Install the macro & forget it

The only required condition for the macro to work, which is set in the macro installer by default: Tools->Options->VBA->DelayLoadVBA = OFF

• statusbar DPI for bitmaps in DRAW X4

Here's the macro that displays a separate small horizontal info bar when the bitmap is selected.

The info window is moveable, yet I think it's best to put it right over the object details status bar section.

The only required condition for the macro to work, which is set in the macro installer by default: Tools->Options->VBA->DelayLoadVBA = OFF

User interface 
Big options dialog patch

2008 Mar,04: FontNavigator
2007 Feb,23: expanded 9 windows

This patch extends size of 9 dialogs in Options of DRAW & PhotoPAINT 11, 12, X3, X4 and also NEW FontNavigator's font properties and duplicate font finder.

Customization commands & toolbars
Quickcorrect words list
Text styles
Page labels
Associate
Active file filters
Warnings
Printing compatibility lists.

Click on small thumbnails to see larger pictures.

images/bigOptUI.png images/thumb_bigOptCommands.png images/thumb_bigOptStyles.png images/thumb_bigOptLabels.png images/thumb_bigOptQuickCorrect.png images/thumb_bigOptAssociate.png images/thumb_bigOptFilters.png images/thumb_bigOptPrinting.png images/thumb_bigOptFontNavChart.png images/thumb_bigOptFontNavSample.png images/thumb_bigOptFontNavDuplicates.png
• Expand workarea (like <Tab> in Adobe's) + ToolBars locking

2008 Feb, 24: dockers panel toggling updated for DRAW X4

  • wx.ShowHideToolbars - toggles visibility of UI elements
    toolbars, palettes, menu, rulers, guides, dockers, application caption (Windows TaskBar may also be hidden)
  • wx.SetupShowHideToolbars - setup of UI elements to be toggled.
    (The options are remembered and are used by the main macro ShowHideToolbars)
  • wx.LockToolbars & wx.UnlockToolbars - to prevent accidental moving of toolbars & menu
    due to a DRAW's bug locking may require an additional procedure if after toolbars locking there is no your custom toolbars in the UI rightclick menu:
    1. restart DRAW, run the wx.SetupShowHideToolbars macro, click Repair
    2. confirm your workspace xml file (click OK in the dialog that appears)
    3. a folder with your xml workspace is opened, keep it, don't close
    4. exit DRAW
    5. delete DRAWUIConfig xml and rename DRAWUIConfig-FIXED xml to the original name (DRAWUIConfig xml)
        if your Explorer isn't showing xml extension then don't type it explicitly of course :-)
  • wx.guidesToggleEdit - Toggle guides layer editability in 1click
    (default master layer only)
  • wx.DockersShufflerToggle - quickly show/hide dockers-shuffler
    (Assign a keyboard shortcut for this macro)
  • Document "InstaSwitch" 2008 Feb, 22 cool!

    Makes document contents instantly active and selectable with the very first click after switching of documents, for example with Ctrl-Tab

    Requires that menu Tools->Options->VBA-> [ ] DelayLoadVBA is unchecked

    Automaticaly loaded in CorelDRAW v12,X3,X4 but not v11.

    Explanation: by default when you switch documents in CorelDRAW v11—X4 with Ctrl-Tab your first mouse click in the new window will be ignored making you think there's something wrong with the pointing device :-), so to select a shape you have to click once more.


shot_ShowHideUI.png

shot_RestoreMenu.png
Emergency restoring of menu visibility if you cannot relaunch the macro using keyboard shortcut:
1. press and hold Alt key (all the time to last step)
2. rightclick empty space in document window
3. in menu that appeared, rightclick any item
4. enable "Menu" (usual leftclick)
5. release Alt
• Mousewheel SCROLLING instead of zooming

To pan (scroll) with mouse wheel instead of zoom.

Put CorelPanScroll.zip in Startup folder of Windows Start Menu (and run it manually for the first time).

The utility sits in tray area and filters mouse events only in CorelDRAW/PhotoPAINT windows and so does not influence overall system performance, and even while it is active it consumes not more than 1% of cpu power.

  • Wheel - pan vertically. Alt+Wheel- pan horizontally.
  • Ctrl+Wheel- zoom. Shift+Wheel- slow in DRAW or fast :-) in PhotoPAINT
  • Press and hold Wheel- to pan quickly the document window
  • To make it launch with CorelDRAW -
    create a new shortcut to CorelPanScroll.zip which you will now use to launch DRAW
    and edit shortcuts's properties to make command line look like:
    "C:\path\CorelPanScroll.zip" "c:\Program Files\Corel\CorelDRAW Graphics Suite 13\Programs\CorelDRW.zip"
  • [ Source AHK script ]
• PhotoPAINT window automaximizer
  • PPapiTimer.PaintMaxEdit - opens maximized PhotoPAINT window for selected bitmap shape
    (Assign a toolbar button / keyboard shortcut for this macro)
  • PPapiTimer.PaintMaxSetup - setups CorelDRAW internal EditBitmap command
    subsequent calls to "Edit Bitmap" command (doubleclick in CorelDRAW 12) will open PhotoPAINT in maximized state
• 2 windows, 2 view modes synchronous for 1 document
  • Synchronously pan & zoom in two document windows (2nd window is auto-opened).
  • Active window is shown in Enhanced view, the other window in wireframe by default.
  • Behaviour can be changed by modifying macro text (most easily done with the above MacroInstaller)
shot_Sync.png
• Icons from workspace extractor
Help files font size override

2008 Feb, 21

The CHMFontSize utility makes help files font larger by converting pixel/pt values hardset in internal css into corresponding percentage relative values.

The utility can also apply an additional arbitrary change of the font, see textboxes in the bottom part.

And finally: your help files receive an additional font changing on-the-fly toolbar button!

images/CHMFontSize.pngimages/CHMFontSizeExample.png

Color  
• Vector ChannelMixer for CMYK
  • Live preview
  • intuitive control sliders and manual entering of values
  • Presets managing: loading (double-click preset name), saving, deleting.
shot_Mixer.png
  • channel copying/moving (drag channel label onto another channel label, Ctrl = copy)
  • automatic conversion to CMYK option - necessary for imported cliparts which are usually RGB
  • processes fills/outlines or both
  • Keyboard modifier while dragging sliders:
    hold <Shift> while dragging slider to force 10% increments,
    hold <Ctrl> to lock all CMYK channels to same value
    hold <Alt> while dragging slider to change all four channels proportionally (rubber mode)
  • Presets are autosaved in %AppData%\Corel\Graphics13(12/11)\User Custom Data\CurveChannelMixer.ini
• ColorReplacer by Oberon - advanced remake
shot_ColorReplacer1.pngshot_ColorReplacer2.png

• Pantone tint colorizer = 'duotone' for vector, text, 1bit bw
Bitmaps
• Export multipage to numbered bitmaps

2008 Feb, 1 Draw X4 TIF export bug workaround

  • JPG, TIF, GIF, PNG, BMP, CDR (for splitting multipage documents)
  • Settings: page range(s), file prefix, starting #, digits count, image size/dpi
  • 5 color modes (including indexed palette with adjustable parameters) and more
  • bleed amount (On: page exported to its bounds , Off: objects area only)
shot_Export.png
• Import bitmap autotagger with file's name
images/smallImportTagger4.gif

import.ImportBitmapWithName — to import pictures retaining their file name & folder in statusbar and object manager.

Usually the macro is launched automatically at startup of CorelDRAW and displays a movable button-sized window, screen position is remembered. There are some options available via rightclicking on this small window, with a some help info in the 'About' menu item.

Just drag'n'drop files on the macro window from a common Explorer folder (not the CorelDRAW open/import dialog!)

Hold Alt while dropping files onto the macro window to ignore forceDpi, hold Ctrl to specify ForceDpi

How to make more room for dpi in statusbar:
remove 'HelpInfo' field, re-arrange 'ObjDetails' & 'ObjInfo' widths and position (btw, more reliably done when in Options->Customization)

Before: images/ImportTaggerSB2before.gif
After: images/ImportTaggerSB2after.gif
• AutoDPI for imported bitmaps
  • wx.setDpi - sets dpi value (without resampling) for bitmaps (selected/page)
  • wx.setDpiSetup - setup automatic dpi setting for any imported bitmaps (0 = disable)
• Re-import linked bitmaps at 100%
Shapes & layers
• Node align direct

wx.NodeAlignLeft, ...Right, ...XCenter, ...Top, ...Bottom, ...YCenter
node align macros act similar to L,R,C,T,B,E shortcuts, and can work with nodes of multiple selected objects.

Note: DRAW does not allow macros to see which node is selected most recently, so all the alignments are absolute e.g. NodeAlignLeft always aligns to the leftmost node. Solution: align all nodes except the target one, then add the target node to selection and invoke corresponding alignment macro depending on current visual relation of nodes

• Layers control
Notice for updating from a very old version — manually delete older GMS: showlayer.gms (without wx_ prefix)
  • mLayer.ActivateLayerSetup - adds to CorelDRAW's caption more info:
    ActiveLayer, ColorProfile (global CMS), short DocumentName, in customizable order.
    To allow autostart with DRAW: Uncheck Tools->Options->VBA->DelayLoadVBA
  • mLayer.toggleLayerAutoActivation - one click toggle shape's layer auto activation on selection
shot_Layers.png
  • mLayer.GroupAndSaveLayers - groups shapes saving layer info in shapes' properties.
    Handy for preserving multilayer structure when copying between documents / pages
  • mLayer.UnGroupAndAssignLayers...... - ungroup & put shapes to original layers, three macros:
    ...Skip - orphaned shapes remain on active layer
    ...One - orphaned shapes go to layer "From deleted layers"
    ...CreateAll - recreates all layers (order is not original)
  • mLayer.ScatterToNewLayers - creates layers for each shape.
    Handy for PSD export, as all layers will be preserved.
  • mLayer.LayerFromSelected - create new layer from shapes.
    New layer is placed above active and gets "+" at the end of name
  • mLayer.SelectLayerShapes - selects all shapes on selected shape(s') layer(s)
  • mLayer.LayerPrevious, LayerNext - select next/prev layer. ASSIGN TO Alt [, Alt ]
  • mLayer.LayerMoveUp, LayerMoveDown - move layer in stack. ASSIGN TO Ctrl [ , Ctrl ]
  • mLayer.SelectLayer - activate layer of selected shape
  • mLayer.MoveShapesToCurrentLayer - moves selected shapes to active layer
  • mLayer.MergeLayersToCurrent - merges layers of selected shapes to active layer.
  • mLayer.LabelLayer - rename active (shape's) layer
  • mLayer.DeleteLayer - remove active (shape's) layer
  • Sep,12: mLayer.HideShape - move shape to an autocreated layer named "Hidden" which effectively hides the shape
  • Sep,12: mLayer.UnHideALLShapes, UnHideShape - restores previously "hidden" shape(s) to its original layer(s)
• BarCodes to curves (via EPS)
• Outlines Scale On/Off (wx.OutlinesScaledON / OFF)
• Duplicates: remove underlying + Connect broken lines
  • wx.removeUnderlyingDups - selects object's copies stacked under each other and offers to delete
  • wx.nodeClean2 - joins separate objects with touching ends into one closed curve
    (dxf import often produces a lot of separate lines of just 1 segment)
  • wx.CtrlShiftQ_dispose - obsolete, now superseded by wx_Tools :: wx.OutlinesToQ_KillEmpty
Productivity 
• Macro explorer & ButtonInstaller
  • Quickly create buttons for macros
  • Run macros, preview code, instant switch to VBA
  • Instant search for a macro name through all the list, with highlighting. Press /\ & \/ to quickjump
  • Choosing an icon out of 800 CorelDRAW built-in images
  • No way to assign a hotkey
  • @AppData text added to a macro name for gms files from %AppData%\Corel\Graphics##\User Draw\GMS\

Follow the links to see extra screenshots: Main UI with macros list & Buttons selection
shot_MacroInstallerSmall.pngshot_MacroInstallerMedium.png
• patch DRAW X3 behaviour on-the-fly
http://img101.imageshack.us/img101/1947/navigatorbeerdy9.th.jpg
  • beta patch.RenderResolution - change Render Effects Resolution, dpi
  • beta patch.AutocenterPowerClipToggle - toggling of "Center new powerclips contents" option
  • beta patch.NavigatorWindowSize - resizes document navigator (50-500, DRAW's default is 150), standard hotkey is "N"
    shot_PatchDrawEN.png
  • patch.CLOLreadToggle - disable reading of ColorStyles from CDR files to speed-up opening
  • patch.CLOLwriteToggle - disable saving of ColorStyles to CDR files to optimize file size to speed-up saving
  • patch.NodeGlyph2xToggle - toggle double size for nonselected node glyphs in node edit mode. Nodes thus are easier to be seen / work with.
  • patch.NodeGlyphColoredToggle Sep,30: toggle node color coding for different types of nodes.
  • patch.SnapRadiusSet Oct,13: set userspecified value of gravity of snapping (1..35, default is 10). High value (35) makes it a lot easier to work with guidelines and snap-to-objects.
  • patch.SnapRadiusStd10, SnapRadiusMax35 Oct,13: 1-click macros to quickly set gravity of snapping to 10 and 35 respectively
  • patch.SlowZoomToggle - toggle mousewheel zoom speed (fast, as in X3 default, or slow, as in Draw11). Shift-scrolling speed is also toggled.
  • patch.ZoomLevelLimitToggle Nov,15: toggle "Maximum (minimum) zoom level achieved reached" messages
  • patch.CrossHairToggle - fullscreen cross hair mouse pointer
  • patch.DispImageAntiAliasToggle - antialiasing of bitmaps in enhanced view mode
  • patch.Setup - setup applying of settings at startup of CorelDRAW
  • works with DrawX3sp2 13.0.0.739, any language
• Save old version (keep CDR file's version)
• FileConverter modification (mass-resave CDR files to another version + PDF export)
• View-manager styles auto delete on document's open & before close
Installation of VBA macros in CorelDRAW

1. Run macro installation package (after exiting CorelDRAW)

2. Create a button/hotkey:
a) menu Tools :: Options :: Customization :: Commands :: Macros
b) drag desired macro to a toolbar
c) assign a shortcut key.

See also:
[ 80 seconds of online 0.5MB video tutorial ]
[ step-by-step button installation ]
[ Macro button installer ]

Links: wOxxOm news blogMacroMonster IsoCalc CoolTools OberonPlace AntiPoetics QuickChange Donate :-)