dim... dim... Set db = session.currentDatabase Set uidoc = ws.currentDocument Set doc = uidoc.document Call doc.save(False, False) Set docCheck = db.getDocumentByUNID(doc.Unid(0))