Word 2003, XML markup and form fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it true that you can only wrap Text Form Fields in XML markup when creating templates if your goal is to save documents created from these templates as XML (Save Data Only)? I found that when I used Check Box and Drop-Down fields in a template, any values I entered in these fields disappeared when I saved the document as XML (Save Data Only). Thanks in advance for any help.
 
Hi =?Utf-8?B?TUVkd2FyZHM=?=,
Is it true that you can only wrap Text Form Fields in XML markup when creating
templates if your goal is to save documents created from these templates as XML
(Save Data Only)? I found that when I used Check Box and Drop-Down fields in a
template, any values I entered in these fields disappeared when I saved the
document as XML (Save Data Only).That is correct. When you "save data only" to XML, Word strips anything that is
not pure text, along with any paragraph marks and other "extra" spaces. Neither
dropdown fields nor checkboxes "translate" to pure text.

Some suggestions:

1. For the dropdown fields you might be able to insert a REF field (Insert/Cross
Reference) that references the dropdown field's name. I'm guessing that the
content of this would be converted to plain text and thus saved.

2. Use a UserForm for the input, and have macro code write the values to the XML
tags in the document.

3. Get really fancy and set this up as a SmartDocument solution. Then you can
have all the input controls in the "Document Actions" taskpane on the right.
(This is what the XML stuff in Word is really for.)

4. Instead of saving in XML format, have a macro that extracts the data from the
form fields and writes it to an XML file.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
Cindy – Thanks for your help. I’ll check out Smart Documents. On the other end of the continuum, I may also just save the form to a text file as data only (comma delimited), which appears to save both checkbox and drop-down values, and then load it into an XML document. – MEdwards
 
Hi =?Utf-8?B?TUVkd2FyZHM=?=,
On the other end of the continuum, I may also just save the form to a text file as data only (comma delimited), which appears to save both checkbox and drop-down values, and then load it into an XML document. – MEdwards
Yeah, that would be a lost less work <g>

Cindy Meister
 
Back
Top