OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 25-02-2011, 14:12
buga buga is offline
Senior Member
 
Join Date: Jan 2011
Posts: 114
Default distribute in pages

hi such.
You see, I would like to propose a macro that I find very useful for some situations.

I would like to select multiple objects and distribute pages in its original position (if possible), (or centered in the page).

I give you an example. Imagine we import multiple files at once and put them all on the same page of the document. apply the macro and have each file on a different page, saving time in distribution.

Could someone please help me make it?

Thank you very much in advance
Reply With Quote
  #2  
Old 25-02-2011, 17:07
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
I think this page should work.

http://forum.oberonplace.com/showthread.php?t=2661


-John
Reply With Quote
  #3  
Old 28-02-2011, 06:46
buga buga is offline
Senior Member
 
Join Date: Jan 2011
Posts: 114
Default

Thanks for the link.

I tried to create a macro code from the link, but I only managed to move all objects to a page, but I can not move multiple objects each to a page.

I think the problem is that when I make the number of pages on the number of objects in the selection, I lose that selection

could someone help me, please?

thanks
Reply With Quote
  #4  
Old 28-02-2011, 12:03
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Ok. Here's my attempt:

Code:
Sub moveToPages()

    Dim s As Shape, sr As ShapeRange
    Dim i&, j&, k&
    
    j = ActivePage.Index
    Set sr = ActiveSelectionRange
    If sr.count = 0 Then Set sr = ActivePage.Shapes.All
    k = sr.count: If k = 0 Then Exit Sub
    
    ActiveDocument.AddPages k - 1
    For i = 1 To k
        If i > 1 Then
            sr(i).MoveToLayer ActiveDocument.Pages(i).ActiveLayer
        End If
    Next i
    
End Sub
-John
Reply With Quote
  #5  
Old 28-02-2011, 13:13
buga buga is offline
Senior Member
 
Join Date: Jan 2011
Posts: 114
Default

Many thanks. It works perfectly.

This macro will be very useful for me.

I appreciate very much your time. You're the greatest.

Greetings

bye
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2,184 Pages?!! jfelder General 1 14-10-2010 09:30
How to distribute the program? ricky0721 CorelDRAW/Corel DESIGNER VBA 3 26-03-2008 10:26
rename pages robert Macros/Add-ons 2 23-01-2008 01:16
how to distribute a macro file mgmcs Macros/Add-ons 4 25-05-2006 08:23
Quantity of pages... x-bond CorelDRAW/Corel DESIGNER VBA 2 10-03-2004 07:19


All times are GMT -5. The time now is 09:53.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com