Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

Extract/Export Drop Down List or Combo box Values from UserForm

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MSDN User  - a rather VBA newbie - 22 Jul 2007 16:38 GMT
I was given a protected word forms which was built by a colleague who no
longer with the company.  I am not sure how it was built, but when ran Visual
Basic (Alt + F11) on form, there was no code shows on VB editor, so I presume
it was built by toolbar form control.

Please help, if anyone have any idea on how to extract or export the
values/items of a Drop Down List and Combo Box to .txt or .xls? I can see the
values when right click on control's property, so in another words, at the
last, I would manually retype them. However my assignment is to redo the
whole form library, which contains approx 50 forms, each form has roughly
10-15 controls, and each control contains over dozen of list items...

Any help would be appreciated. Thank you.
Doug Robbins - Word MVP - 23 Jul 2007 11:38 GMT
The following code will cause each of the entries in a dropdown formfield to
be displayed in a message box

Dim i As Long
With ActiveDocument.FormFields("DropDown1").DropDown
   For i = 1 To .ListEntries.Count
       MsgBox .ListEntries(i).Name
   Next i
End With

You could use that method in a modification of the code in the article "Find
& ReplaceAll on a batch of documents in the same folder" at:

http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

To go through each file and extract the entries into another document.
Signature

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

"MSDN User - a rather VBA newbie" <MSDN User - a rather VBA newbie
@discussions.microsoft.com> wrote in message
news:B5E02239-EEBB-4FAD-89AD-871D84C38B69@microsoft.com...

>I was given a protected word forms which was built by a colleague who no
> longer with the company.  I am not sure how it was built, but when ran
[quoted text clipped - 12 lines]
>
> Any help would be appreciated. Thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.