Data entry environment using Word 2003

G

Gautam K Banik

What is the best way to provide users with field-like environment in Word
2003? The place holders need to be protected and tagged.

1. Have tried bookmarks... not secure enough as they can be easily deleted
by the user
2. Have tried form fields... formatting does not work within fields

Can Word 2003 XML features do the trick? Any possible solution/direction is
welcome.

Gautam K Banik
(e-mail address removed)
Corcomp Infosystems Ltd.
 
H

Hans Michel

Gautam K Banik

I am not certain what you mean by tagged. But as for protected.

I suggest using a template (dot) centered around the use of Styles, Tables,
Bookmarks, add if VBA can be used Document Variables.

Similar to CSS use word style sheet to tightly integrate the structure.
Although word will use Normal.dot as a base most of the styles you create in
this template should be base on an initial style that is based on no style.
There are some word styles that are defaults and can not be deleted but for
your template all styles should be custom built.

For example you can use Table structure if you need to add multiple answers
to a question. As you know when you reach the end of a table if you to add
another row you simply hit return an word adds a row (no VBA needed). Now
each paragraph, table, character, list can take on specific style from a
template by specifying what the style after is. This tightens your layout
and constrains the user not from deletion, but now you can easily detect
deletion since style before and after for every element in your document is
defined. So this is very much like a DTD, after style1 you have style2 or
(multiple style1) .

Bookmarks can be used to set sections and placeholders.

Now if your client will tolerate a bit of VBA then you can use Document
Variables to save current document state. And upon any undesired deletion
you can rebuild the document. Document Variables were not meant for this
sort of thing (there is a size limitation), but I have used them for that
function.

Now this will be your base.

If by tagged, you mean that you wish to use xml schemas and stylesheets then
go here for example.

http://msdn.microsoft.com/library/?url=/library/en-us/dno2k3ta/html/ODC_OFXML_in_Office2003_jrd.asp

Using XML as a solution does not stop a user from deleting an entire
document, saved xml data file, the style, the template. I have found if VBA
is acceptable then using the Document variable is a life saver.
Sophisticated user can write a macro that goes through an active document
and delete all of its variables. At this point the only solution I can think
of is binding the XML doc to a web service. At which point you keep track of
changes in the XML data so user can delete whatever they want once data is
entered in off site database there's not too much user can do there.

Hans
 
G

Gautam K Banik

Have tried using XML on Word document. Here is where I am stuck:

I cannot let the user delete any XML node by mistake. Is there some security
check that can be implemented to stop the user for deleting nodes?
Alternatively,
Can I utilize the "Document_XMLBeforeDelete" event to undo the action?

Gautam.
 
H

Hans Michel

Gautam:

You can utilize what ever you want, "XMLBeforeDelete" is an acceptable place
to catch user changes but a tight XML schema can't hurt. If you want a node
to always be there use your XML Schema to direct restrictions and validate
your xml file. If you simply want to hide the tag Ctrl+Shft+X. Or its
equivalent.

Please note that the solution outlined is the general path used by most
developers.

I think your questions is better suited in
"microsoft.public.office.developer.active.documents" newsgroup.

Also see

http://www.microsoft.com/downloads/...b0-2c64-4723-b282-8859c8120db6&displaylang=en

Good luck

Hans
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top