Exporting form responses from Word

divs7dm

New Member
Joined
Aug 12, 2004
Messages
15
Hi:

Is there a way, I can export responses from a word document captured in forms-text box onto Excel.

I have several forms and I want to export this data in excel for side by side comparision.

Thanks

Divs
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi Divs,

Yes, this is not hard to do. I recommend giving each textbox a name (in Word) so that they can be referred to clearly in your code. Here is an example of some code that reads Word textboxes and places the values in worksheet cells. This example also reads a set Word form checkbox values.

Note that in this example cell B1 on the active worksheet contains the name of the Word form to be read.



Sub ReadWordForm()
Dim Wd As Object
Set Wd = GetObject([b1].Value)
'Read data from word onto spreadsheet
[b3] = Wd.formfields("TitleTB").Result
[b4] = Wd.formfields("OriginatorTB").Result
[b5] = Wd.formfields("DateTB").Result
[b6] = Wd.formfields("TimeTB").Result
'Now read checkbox status values
Dim CB As Object
Dim iRow As Integer
iRow = 8
For Each CB In Wd.formfields
If CB.CheckBox.valid Then
Cells(iRow, 1) = CB.Name
Cells(iRow, 2) = CB.CheckBox.Value
iRow = iRow + 1
End If
Next CB
Wd.Close
Set Wd = Nothing
End Sub


I hope this helps.

Damon
 
Upvote 0
Word information to Excle

Is there a way to import information contained in several forms to an Excel worksheet with out VBA coding it? I saw some previous posts, but they all seem to involve VBA coding...
 
Upvote 0
Hi thebigwilley,

I can't think of any way to do this without the use of VBA. Is there a particular reason for your desire to avoid VBA? Perhaps we could suggest some way of alleviating this problem if you describe it.

One of the advantages of VBA with reading Word forms is that, if you have lots of users submitting forms, VBA can be used to automatically read and loop through all the forms (for example, all forms in a particular folder) and tally the results.

Damon
 
Upvote 0
I'm an idiot....

OMG, so I am just trolling through my "since you last visited" and found this one which I forgot about... :oops:

if anyone cares, i just don't know much about vba, just learning right now, but I think I may try this out and see if I can't get it to work for me. I believe I fixed that particular problem by entering the information in Excel and Mail merging my individual word docs for printing.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top