Validate File is a Word Document

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Don

    #1

    Validate File is a Word Document

    I'm looking for a quick method via some .NET code to validate that .doc files
    that I receive for processing are valid (or at least have some high
    likelyhood of being valid) Word documents. I've got a method to determine if
    PDF and TIFF files that I receive are likely good files by looking at the
    first few bytes of each of those file types. Is there an equivalent type
    check for Office files, especially Word documents. I'd like to avoid loading
    the Word object model but anything will do that is quick and unlikely to
    crash. We are having problems in our application with users creating PDF
    files and renaming to .TIF file extendion so we need to validate all files on
    receipt.

    Thanks, Don ...

Working...