drop down form fields

D

Derek Rule

I have a form which contains a number of entries as drop down form fields (to
allow users to select from a drop down list) and simple text fields. Data
from the Word document then needs to be extracted and loaded into an Excel
spreadsheet. I am using Word bookmarks to pass data into a VBA variable and
into a function which calls an instance of Excel, opens the appropriate
workbook and worksheet and fills out the relevant columns and rows - that bit
is not a problem. However, whilst the data from the text form field is
passing across quite happily and is available to Excel, the data from the
drop down form field arrives as a blank (probably an unprintable) and not the
selected item from the dropdown. How can I get the selected item from the
list into a variable in order to pass it properly into Excel? There is
probably a really simple solution, but it escapes me. Incidentally, I would
prefer to keep the drop down box - the contents change and this is a really
simple way for a naive user to maintain the lists within the template form.
 
D

Doug Robbins - Word MVP

Use the .Result attribute of the drop down formfield to get the item
selected in the dropdown.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
D

Derek Rule

Thanks Doug. Once I got my act together and used the Result attribute of the
FormField Collection rather than the Bookmark Collection, it was sorted.
Again many thanks.
 

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