Hi =?Utf-8?B?V2F5bmUgRmVyYWVyYQ==?=,
> I've also had the problem of trying to get dropdown or checkbox data out of
> WordML. Below is what a small Drop-Down Form Field looks like in WordML.
> I've tried to base64-decode the fldData put with no joy.
No, it's in a proprietary, binary format. I've had discussion about this in
the office.developer newsgroups (you can search Google) and we've reached the
following conclusions
1. You cannot get the information from a dropdown field. Best you can do is
include code in your form that will write the dropdown field selection to
something else, such as a document property, document variable or a (hidden)
textbox form field
2. You can sorta get the information from a checkbox. The checked vs. the
unchecked states *in the same context* are always the same XML. By "same
context" I mean position in relation to other things. Things I've found that
affect the XML code of a checkbox:
- is it the default name, or have you named it
- is it alone in a table cell
- have you selected and bookmarked it
As long as you "know" the document - or better, have set it up - you can
reliably extract the checkbox information.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)
Wayne Feraera - 11 Apr 2006 12:47 GMT
> Hi =?Utf-8?B?V2F5bmUgRmVyYWVyYQ==?=,
>
[quoted text clipped - 29 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
Hi,
Thanks for the reply.
I have a dropdown list called "Title" with 3 values (Mr. Miss. Mrs.)
You have written "You cannot get the information from a dropdown field".
As per your suggestion, I have placed a bookmark next to dropdown field(
will hide it later once it works), whose value is updated upon selecting
different values of Dropdown list. (New value selected is Miss)
Now I have read the value in this new hidden bookmark and have written it to
Database. That is also fine.
My Query is, "HOW CAN I SET THE INFORMATION TO DROP DOWN LIST". (i.e.
previously selected value i.e. MISS).
Whole of last week I was actually going through your articles only,
fortunately this is attended by you. Thanks.
Cindy M -WordMVP- - 11 Apr 2006 15:42 GMT
Hi =?Utf-8?B?V2F5bmUgRmVyYWVyYQ==?=,
> My Query is, "HOW CAN I SET THE INFORMATION TO DROP DOWN LIST". (i.e.
> previously selected value i.e. MISS).
Using XML respectively a transform? You cannot.
If you have macro code in the document, then an AutoOpen macro should be
able to do this. Roughly:
ActiveDocument.Formfields("XYZ").Result =
ActiveDocument.Bookmarks("Name").Range.Text
(Note: using this technique you can even add values to the list! So be
careful.)
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)