Hello,
I need to find a word documents version programmatically. To do this i think
nfib value of the File Information Block can be used. In the
Word97-2007BinaryFileFormatSpecification the nfib information is as follows;

Summary of nFib values:
WinWord 1.0 = 33
WinWord 2.0 = 45
WinWord 6.0c for 16bit = 101
Word 6/32 bit = 104
Word 95 = 104
Word 97 = 193
Word 2000 = 217
Word 2002 = 257
Word 2003 = 268
Word 2007 = 274

My code is;

HWPFDocument doc = new HWPFDocument(new FileInputStream(wordFile));

int nfibValue = doc.getFileInformationBlock().getNFib();

I have different word files (Word 2000 file, word 2002 file, Word 2003
file), for all these files the code returns the nfib value equals to 193!

Do you have any idea about why nfib value is not changing and if you have
any other thoughts to understand which MS Word version the document is
created from.

Thank you

Gurkan.

Reply via email to