OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 28-02-2005, 14:00
mecanomaniaco
Guest
 
Posts: n/a
Default Importing only 1st page from a multipage CDR

Anybody have a clue???

I've try almost everything but can't find something to work, StructImportOptions seems not to have a choice, not even the command itself have a parameter to help.
Anyways, this is my scenario: need to import cdr files (wich rarely have more than 1 page) into an already built doc wich have 7 pages. What I'm getting when importing files with more than 1 page is: Corel add to my document [pages.count -1] pages and place what is in the 1st page of the imported doc in the 1st page of my working doc and the rest of pages in the same way (I really don't get why the heck is adding pages to a document that already has enough pages to put its contents) ignoring what page is currently active. It doesn't happens when the imported doc has only 1 page because it seems to treat the doc's contents like a unique object.
I know I could open the file, activate first page, select whatever is inside and copy/paste in my doc and activate the original doc and close it but... it should be easy to stand activelayer.import <file>, <page(s)> or something like that.

I just did my last research before post but... nope. I'm hitting Send right now. Tnx.
Reply With Quote
  #2  
Old 28-02-2005, 14:49
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Importing only 1st page from a multipage CDR

Well, unfortunately there is no way. CorelDRAW just brings in all the pages. The only thing you can do is to disable StructImportOptions.MaintainLayers and all the objects from all the pages should come in as a single group.

Unfortunately CorelDRAW has a bug in import code that still adds all the pages to the document. The way it supposed to work is that if you have a 7 page document (page 7 is active) and you import a 2 page document, the first page of the document being imported should be placed on page 7 of the current one, and the second page should go to the page 8 which will be added. However currently, the application adds pages as expected, but puts the additional pages on pages 2 and up. Which is just a plain bug.

I hope this explains it a bit...
Reply With Quote
  #3  
Old 28-02-2005, 16:04
mecanomaniaco
Guest
 
Posts: n/a
Default

How sad, following the object structure of a Doc the StructImportOptions MUST have more choices like page range selection because layers "lays" on Pages and pages on documents and so on...

Hope v13 fix it!
Thanks Alex.


BTW, disabling StructImportOptions.MaintainLayers doesn't keep all objects together in a group, only groups objects by page.

:wink:
Reply With Quote
  #4  
Old 28-02-2005, 17:21
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

VBA can't do more than CorelDRAW can do by itself (in most cases). So if you can't just import one page through UI, chances are you can't through VBA either...

There are some functions which can be done through VBA only, but in most cases, object model just provides a programmatic interface to what the application can do.
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
Automatic Catalog Page Creator Export to .PDF format logoguy New product ideas 1 24-06-2008 18:51
delete vba project from cdr file hotairballoon CorelDRAW/Corel DESIGNER VBA 1 18-05-2005 09:08
Export each page with a diff. file name ddonnahoe CorelDRAW/Corel DESIGNER VBA 3 02-02-2004 14:40
How do you "go to" a specific /named/ page? Steve CorelDRAW/Corel DESIGNER VBA 2 08-05-2003 17:10
Page selection and object moving problems wbochar CorelDRAW/Corel DESIGNER VBA 1 15-04-2003 09:10


All times are GMT -5. The time now is 21:30.


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