Word VBA rant

From FVue
Jump to: navigation, search

Why doesn't Word VBA allow me to directly access the properties of an index field (field of type wdFieldIndexEntry)? Do I really have to write a parser myself to decompose field.Code.Text containing for example:

{ XE "main entry:second entry" \b \t "See other" } 

Why doesn't Word give me easy attributes like field.Entry1, field.Entry2, field.Bold, field.CrossReference, etcetera? And this after 30+ years of existence, and with the code hidden in some dll because the index generator can already parse the above!

Instead Microsoft Office users are left to themselves, reinventing the wheel, writing parsers:

Writing your own parser means dealing with a lot of corner cases, all already handled by Word's index generator, but now it's up to you:

{ XE \b" main entry:second entry "\tseeOther\i}

Heck, the quotes can even be "smart quotes" (sic). I know why I left the Microsoft scene.


blog comments powered by Disqus