View Single Post
Old 06-05-2015, 21: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:

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


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