Each time GetNextDoc() is called, DocTypeId will return an integer identifying the file type of the previous document.