Skip to Main Content
CorelDRAW Ideas Portal
Created by Guest
Created on Jun 2, 2022

Add page frame to each page in doc, instantly

Now, I can add page frame for one page at a time. Or I can write a macro (do those still exist? In 33 years of using CorelDraw I never wrote a macro). I want the button to say, Add page frame for this page only, Add page frame for each page in document.

  • Attach files
  • Miroslav Balchev
    Reply
    |
    Mar 10, 2023

    Hello,
    Page Frame is a rectangle with size of page.
    Below is my code to add rectangles / Page frames to all pages in active document of CorelDRAW.

    This code is started from commandbutton on user form

    Private Sub CommandButton141_Click()

    Dim MSHAPE As Shape

    Dim MPAGE As Page

    For Each MPAGE In ActiveDocument.Pages

    Set MSHAPE = MPAGE.ActiveLayer.CreateRectangle(0, ActivePage.SizeHeight, ActivePage.SizeWidth, 0)

    MSHAPE.Outline.Width = 0.2

    MSHAPE.Outline.Color.RGBAssign 255, 0, 0

    Next

    Me.Hide

    End Sub


    Here is code to add 10 pages to active document

    Private Sub CommandButton132_Click()

    ActiveDocument.AddPages (10)

    End Sub

    Greetings!


  • Miroslav Balchev
    Reply
    |
    Mar 10, 2023
    Hello, I will write You a macro Macros are great! Greetings!
  • Ron Wood
    Reply
    |
    Jan 15, 2023

    LOL, Kürşad Çakır .... I have the same time put into CD as the OP and just learned of that sequence the other day.

    Who RTFMs ???

  • Kürşad Çakır
    Reply
    |
    Jun 3, 2022

    Maybe it can be via CTRL + SHIFT + Double Click to rectangle tool.