Hi Abe,
I'm using Word 2007, and coding in Visual
Studio 2008 (VB) on a machine running Vista Ultimate 64-bit.
Mmmm. Well, as Doug says, there's no way to create custom fields in Word, although
the Private field can be used to store things in the text flow. The problem here,
though, is "formatted".
I'm inclined to say you should store the information as WordProcessingML (2003) or
WordOpenXML (2007). That's a plain string, but it carries the formatting
information (similar to HTML). You'll find more information about the actual XML
vocabulary at OpenXMLDeveloper.org and in MSDN.
As to the storage medium: just how susceptible is this going to be to accidental
user-deletion? How do you envision the user will be working with these documents?
I'm thinking that either XML nodes might be suitable as "markers". You could store
the things the user shouldn't see as Attributes.
ContentControls linked or associated to a CustomXMLPart might be another
possibility. The CXP can contain additional elements and attributes for storing
data. The only problem with this is that a rich text content control cannot be
directly linked to a CXP. But depending on how everything is supposed to "mesh",
there might be a way to swing it.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply in
the newsgroup and not by e-mail