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

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















 Helpful VBA Code
Please order a commercial macro ONLY if you have at least intermediate professional experience with CorelDraw and macros, no beginners PLEASE. Try FREE macros here and see my help pages to learn. You agree to all terms and conditions here when buying a commercial macro or free GDG Macros. No refunds, no exchanges.
Note: Macros do not function in the Home & Student Edition or Pirated Versions of CorelDraw!
Join ME on Facebook to stay up to date with news, updates. Subscribe to my YouTube Channel for tutorial videos and tips.
CorelDraw X8 and some v.2017 macros available as well as older versions. Not all macros are guaranteed to be continued due to compatibility reasons or other. See new version policy here. Contact me and let me know which macro you need for v.2017. All macros without a request might be discontinued. I release them when I can so please be patient usually about one every week or so.
^ 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 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