![]() |
#1
|
||||
|
||||
![]()
In CorelDraw 12 I am trying to print my selected shape only. The code looks like this:
Code:
Set s = sr.ConvertToBitmapEx(cdrRGBColorImage, False, False, 300, cdrNoAntiAliasing, False) s.CreateSelection ActiveDocument.PrintSettings.PageRange = prnSelection ActiveDocument.PrintOut Any ideas on how to make this work? I stole the code from the VBA recorder and the help file doesn't have anything under prnSelection. So I am not sure if this is the correct way to use it or not. Thanks, Shelby |
#3
|
|||
|
|||
![]()
I had the same problem awhile back...just a bug in the vba i suppose..the print dialog box knows something is selected. It doesn't seem to matter what is selected either. I ended up copying it to another layer & toggling the two layers printable, printing the activedocument and then moving it back to its original layer. *sigh*
|
#4
|
||||
|
||||
![]()
Well Alex I would have to say this is a bug. Would you like me to report it? Here is what I tried:
Code:
Set s = sr.ConvertToBitmapEx(cdrRGBColorImage, False, False, 300, cdrNormalAntiAliasing, False) s.CreateSelection DoEvents ActiveDocument.PrintSettings.PageRange = 2 ActiveDocument.PrintSettings.ShowDialog 'ActiveDocument.PrintOut I did add the ShowDialog to see what it said, and it shows no radial button being selected. (So that might be the problem) Also I noticed when I was typing the line "ActiveDocument.PrintSettings.PageRange =" it does not give the choices of prnCurrentPage, prnPageRange, prnSelection, prnWholeDocument like I would expect. I also tried changing to the numeric value of 2, just to see if that would work...and no luck. So I would have to say it is a bug, and simply doesn't work. Shelby |
#5
|
||||
|
||||
![]()
Shelby, are you sure that the recorder put ".PageRange = " in the recorded macro? Because this method is a string which takes the numbers of pages to be printed, such as:
Code:
ActiveDocument.PrintSettings.PageRange = "1,3,5-9" Code:
ActiveDocument.PrintSettings.PrintRange=prnSelection |
#6
|
|||
|
|||
![]()
Changed my old code up..works great. Well Shelby at least I know I'm not the only one who made the same mistake.
![]() ![]() |
![]() |
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 |
Automate printing | hernux | CorelDRAW/Corel DESIGNER VBA | 0 | 31-03-2005 22:39 |
Draw 12 : Printing Problem | Hernán | General | 3 | 20-09-2004 11:54 |
Paste and Undo List problem | Michael Cervantes | Corel Photo-Paint VBA | 5 | 11-09-2004 05:47 |
Problem with Export (or Save as) in AI-Format | LOT | CorelDRAW/Corel DESIGNER VBA | 3 | 10-02-2004 15:28 |
Printing | Mark | CorelDRAW/Corel DESIGNER VBA | 7 | 11-07-2003 18:02 |