home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 January / DPPCPRO0198.ISO / code / Applications / CheckProperties.bas next >
Encoding:
BASIC Source File  |  1997-10-28  |  687 b   |  30 lines

  1. Attribute VB_Name = "CheckProperties"
  2. Option Explicit
  3.  
  4. Private Sub CheckWhenPrinted()
  5.     Dim vntLastPrinted As Variant
  6.     
  7.     On Error Resume Next
  8.     vntLastPrinted = ActiveDocument.BuiltInDocumentProperties![Last print date]
  9.     
  10.     If Err.Number <> 0 Then
  11.         
  12.         If Err.Number = &H80004005 Then
  13.             vntLastPrinted = Null
  14.         Else
  15.             Err.Raise Err.Number
  16.         End If
  17.         
  18.     End If
  19.     
  20.     On Error GoTo 0
  21.     
  22.     If IsNull(vntLastPrinted) Then
  23.         MsgBox "Never Printed!", vbInformation + vbOKOnly
  24.     Else
  25.         MsgBox "Last Printed " & vntLastPrinted, vbInformation + vbOKOnly
  26.     End If
  27.     
  28. End Sub
  29.  
  30.