![]() |
#1
|
|||
|
|||
![]()
I made a macro to speed up common printing jobs. It seems the first time it runs it crashes CorelDraw. I'm trying to find out why. I added a check so that it would only run if the document isn't dirty. But with the following code it is always coming up dirty. Can anyone tell me why:
Code:
Sub QuickPrint() For Each p In ActiveDocument.Pages p.AllLayers("Document Grid").Printable = False ' p.AllLayers("Desktop").Printable = False ' p.AllLayers("Guides").Printable = False ' p.Layers("Guides").Printable = False Next p If ActiveDocument.Dirty = True Then MsgBox "Please save document before printing", vbOKOnly, "Oops!" Exit Sub End If frmQuickPrint.Show End Sub |
#2
|
|||
|
|||
![]()
May be first check
If ActiveDocument.Dirty = False and then make all grid/guides/desktop layers are not printable and call frmQuickPrint.Show? |
#3
|
||||
|
||||
![]()
Yes, Shark is correct. By cycling through your For...Each loop, you 'Dirty' the document. You should do a check before, or save the document right after you turn off your layers.
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
#4
|
|||
|
|||
![]()
Thanks, I've tried both methods but CorelDraw is still crashing. It seems the first time I run tmy macro CorelDraw crashes but then it is OK. Does this suggest anything to anyone?
|
#5
|
||||
|
||||
![]()
I've also seen Draw crash during a print operation. What version are you using? Are you using any saved print profiles?
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
#6
|
|||
|
|||
![]()
I'm using plain X6 without any service packs. I hadn't got as far as incorporating print profiles but that was my intention.
|
#7
|
||||
|
||||
![]()
Hmmm... Can't say I remember much from X6 print crashing, but in X7 It happens to me a lot. I've resorted to exporting any print jobs to PDF and printing them from Acrobat. I'll ask someone from Corel to look into this.
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
![]() |
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 |
Dirty related event in CD 12? | barnold | CorelDRAW/Corel DESIGNER VBA | 1 | 26-07-2004 00:28 |