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 06-05-2015, 20:04
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 434
Default Why always dirty? X6 (no SPs)

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
I would only expect a message if some change was being made but I've run tests and I get the message everytime. How to check whether certain layers are printable without making the document dirty? Thanks
Reply With Quote
  #2  
Old 07-05-2015, 04:16
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 146
Default

May be first check
If ActiveDocument.Dirty = False
and then make all grid/guides/desktop layers are not printable and call frmQuickPrint.Show?
Reply With Quote
  #3  
Old 08-05-2015, 07:13
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

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.
Reply With Quote
  #4  
Old 13-05-2015, 19:22
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 434
Default

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?
Reply With Quote
  #5  
Old 14-05-2015, 07:18
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

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.
Reply With Quote
  #6  
Old 15-05-2015, 19:23
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 434
Default

I'm using plain X6 without any service packs. I hadn't got as far as incorporating print profiles but that was my intention.
Reply With Quote
  #7  
Old 18-05-2015, 07:30
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

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.
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
Dirty related event in CD 12? barnold CorelDRAW/Corel DESIGNER VBA 1 25-07-2004 23:28


All times are GMT -5. The time now is 02:47.


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