GDG Code Chunks, Discussion, VBA Snippets for CorelDRAW, Simple Macro Helpers!

cool vba macros for corel show cart gdg corel draw macros checkoutMyAccount corel macros
VBA Corel Macro Help
john's macros
thanks for stopping by gdg macros















Helpful VBA Code
New 2024 GDG Macro Suite Available now! Very limited time discount code enter 34MAY2024 for 34% off.

55% off upgrade discount code will be emailed to all those who bought suite 2023. New in this suite, several "B" versions of macros, for those having issues with macros running in systems with international decimal settings.

Previous message (5-15-2024): Hi, all. Sorry for any lack of communication lately. I have been extremely busy running my graphics and car audio shop. The days are long with little rest. I finally had a chance to see some of your emails and will see what I can do about CorelDraw 2024 macros. I haven't decided on an exact direction but may release mini-suites, or just the whole suite again with upgrade pricing. The best deal of course would be the purchase of the GDG Macro Suite.
Available now! GDG Macros Suite 2023.
Please note: Macros 2023 and above will no longer be sold separately.
Join me on Facebook to stay up to date with news, updates. Subscribe to my YouTube Channel for tutorial videos and tips. Need a custom macro? Contact me.
Not all macros are guaranteed to be continued due to compatibility reasons or other. Read new-version policy here.
I appreciate everyone! Upgrading macros and maintaining this site is quite a task for me. Want to contribute? Please DONATE
^ Hide these messages to save screen space ^

<<Back to helpful code list

Click to create guidelines, even inside powerclips

Decription: This is a modification of code posted by wOxxOm. It now adds ability to create the guidelines inside powerclips and also adds a quick delete sub for the guidelines inside the powerclips. I wrote this quick and didn't do a lot of testing but it works. Modify as needed.

Date: 2010-05-09 Author: wOxxOm, modified by John

Code:
Sub DrawGuideHorizontal2()
    Dim p As lpPoint, x As Double, y As Double, l As Layer
    Dim pwc As PowerClip
    Dim s As Shape, sg As Shape
    Dim x1 As Double, y1 As Double, w1 As Double, h1 As Double
    
    GetCursorPos p
    ActiveWindow.ScreenToDocument p.x, p.y, x, y
    Set s = ActivePage.SelectShapesAtPoint(x, y, True).Group
    If Not s Is Nothing Then s.GetBoundingBox x1, y1, w1, h1
    Set l = ActiveLayer
    Set pwc = Nothing
    On Error Resume Next
    Set pwc = s.PowerClip
    On Error GoTo 0
    If Not pwc Is Nothing Then
        pwc.EnterEditMode
        Set sg = ActiveLayer.CreateLineSegment(x1, y, x1 + w1, y)
        sg.Outline.Color.CMYKAssign 100, 0, 0, 0
        sg.Outline.SetProperties Style:=OutlineStyles(8), DashDotLength:=0#
        sg.Name = "tempGuide"
        pwc.LeaveEditMode
    Else
1001
        ActivePage.Layers("Guides").createGuide x, y, x + 1, y
    End If
    l.Activate

End Sub

Sub DrawGuideVertical2()
    Dim p As lpPoint, x As Double, y As Double, l As Layer
    Dim pwc As PowerClip
    Dim s As Shape, sg As Shape
    Dim x1 As Double, y1 As Double, w1 As Double, h1 As Double
    
    GetCursorPos p
    ActiveWindow.ScreenToDocument p.x, p.y, x, y
    Set s = ActivePage.SelectShapesAtPoint(x, y, True).Group
    If Not s Is Nothing Then s.GetBoundingBox x1, y1, w1, h1
    Set l = ActiveLayer
    Set pwc = Nothing
    On Error Resume Next
    Set pwc = s.PowerClip
    On Error GoTo 0
    If Not pwc Is Nothing Then
        pwc.EnterEditMode
        Set sg = ActiveLayer.CreateLineSegment(x, y1, x, y1 + h1)
        sg.Outline.Color.CMYKAssign 100, 0, 0, 0
        sg.Outline.SetProperties Style:=OutlineStyles(8), DashDotLength:=0#
        sg.Name = "tempGuide"
        pwc.LeaveEditMode
    Else
1001
        ActivePage.Layers("Guides").createGuide x, y, x + 1, y
    End If
    l.Activate

End Sub

Sub deleteGuidelinesInPC()

Dim s As Shape, sr As ShapeRange
Dim pwc As PowerClip, sp As Shape

Set sr = ActivePage.FindShapes

For Each s In sr
    Set pwc = Nothing
    On Error Resume Next
    Set pwc = s.PowerClip
    On Error GoTo 0
    If Not pwc Is Nothing Then
        For Each sp In pwc.Shapes.All
            If sp.Name = "tempGuide" Then sp.Delete
        Next sp
    Else
        If s.Name = "tempGuide" Then s.Delete
    End If
Next s
End Sub


corel macros boost workflow
*Searches the FREE and Commercial Macros


CorelDraw macros for version 2024

CorelDraw macros for version 2023

CorelDraw macros for version 2020

CorelDraw macros for version 2019

CorelDraw macros for version 2018

CorelDraw macros for version 2017

macros for coreldraw x8

macros for coreldraw x7

macros for corel draw x6

macros for corel draw x6

FIND IT ON

find it on yahoo

FIND IT ON

find it on google