![]() |
|
#1
|
|||
|
|||
![]()
I'm making some corel document, and then i want to create by VBA another document where (again by VBA) i want to operate objects from original doc (of course place them there, and calculate their sizes, positions using their sizes an positions in original file)
How can i do this? |
#2
|
||||
|
||||
![]()
Again, I'm not quite sure what exactly you are trying to do. Could you explain it in more details? Try to explain it on a step-by-step example, something like:
- I want to create a document and create two rectangles in it - Create another document and copy the first rectangle from the first document into it. - Fill the rectangle in the second document with red. - Get the size of the rectangle - Make the second rectangle in the first document the same size. Something like that. Or, maybe, describe your problem and we'll try to see what should be done to resolve it. |
#3
|
|||
|
|||
![]()
ok.
1. I am making first document. There i draw several graphics and write some text (next it will be converted to graphics too). This file is the preview of some production unit - PVC cap for alcoholic industry. ![]() This unit is truncated cone made of PVC with some pictures on its sides This pictures i am drawing. Preview is planar, - i am drawing my pictures on a broach, which on a preview step is simple a rectangle 2. After the preview is made i have to make an exact broach, from which one my production unit will be made. at this step broach is not a rectangle. Now it is a segment of a circle. all pictures and text must placed there, moved and rotated at some angles. 3. So, i create my second document and i want to place there all graphics from the first one and distribute graphics according to its position in the first document. I read VBA reference but i did not find way to get access to objects and their properties laying in another opened in corel document (but not active) |
#4
|
|||
|
|||
![]()
sorry, first wrote to wrong topic
![]() |
#5
|
|||
|
|||
![]()
question fof alex -
have you ever been to russia? ![]() im asking because your name seem's to be russian. If you speak russian - please contact me - ama1@tut.by or ICQ - 162709707 |
#7
|
|||
|
|||
![]()
Dim s5 As Shape
Set s5 = Apllication.ActiveDocument.ActiveLayer.Shapes(1) - this construction works Set s5 = Apllication.Document(1).ActiveLayer.Shapes(1) - this is NOT wirking I can get access only for objects and their properties/methods in active document. But when i am trying to access another opened document using common implicit property item(or Document(1)), which is the same) - i get "error 424. Object required" Apllication.Document.Item(1).Unit=cdrMillimeter - does NOT working How can I fix It? |
#8
|
|||
|
|||
![]()
Dim d5 As Document
Set d5 = Apllication.CreateDocument() - also does NOT working. Help! What am I doing wrong? |
#9
|
|||
|
|||
![]()
Dim d5 As Document
For Each d5 In Apllication.Documents ... Next d5 - does NOT working |
#10
|
|||
|
|||
![]()
This what is said in "VBA Programming guide fir Corel11":
"Whenever a CorelDRAW(CDR) file is opened, a new Document object is created in the Application object for that document. Application contains a collection, Documents, that provides access to all of the open documents." So why if it "provides access to all of the open documents" i cant get this access?! |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
document name and created date in Corel drawing | eric | CorelDRAW/Corel DESIGNER VBA | 5 | 14-09-2004 22:17 |
Corel 9 Absolute document path | mpp_piotrp | CorelDRAW/Corel DESIGNER VBA | 2 | 14-08-2004 00:23 |
Problem with opened dialog box Corel Draw 11 | dergy | CorelDRAW/Corel DESIGNER VBA | 1 | 14-06-2004 10:04 |
Corel Draw 9 Active Document | korner | CorelDRAW/Corel DESIGNER VBA | 2 | 17-04-2004 01:46 |
Copying objects to clipboard then closing document. | CORNMEN | CorelDRAW/Corel DESIGNER VBA | 4 | 31-03-2003 09:52 |