File Format & Compatibility

Export Word Content Control Responses to a Text File for Excel

Aamir Naveed AkramAamir Naveed Akram Nov 14, 2026 869 views

Question details

The user needs to save Word form responses to a text file that Excel can import.

Export Word Content Control Responses to a Text File for Excel
Product
Microsoft Word and Microsoft Excel
Device & OS
not provided
Scenario
A Word form uses content controls, and its responses need to be transferred into Excel.
Observed behavior
Word's delimited form-data export may produce an empty text file because content controls are not exported like legacy form fields.
Before you start

In Word, select a form field and check whether Developer > Properties is available for a content control. For the VBA method, save the completed document locally and give each control a descriptive tag or title.

Solution 1Recommended

Extract content control values with Word VBA

Use this method in desktop Word for Windows to create a tab-delimited UTF-8 file containing each control's tag and value.

The export creates one row per content control, not one column per form field. The document must be saved in a local folder, and the macro uses Windows ADODB.Stream.

Save the form as a Word document to preserve its controls. The text export contains values and labels, not the controls themselves.

1
Check control labels

In Word, open the completed form. Select each content control, choose Developer > Properties, and enter a descriptive Tag or Title. If Developer is missing, enable it under File > Options > Customize Ribbon.

2
Add the export macro

Press Alt+F11, select Normal in the VBA editor, and choose Insert > Module. Paste this code into the module: Sub ExportContentControls() Dim cc As ContentControl, s As Object Dim p As String, label As String, value As String If ActiveDocument.Path = "" Then MsgBox "Save the document in a local folder first." Exit Sub End If p = ActiveDocument.Path & Application.PathSeparator & "form-responses.txt" Set s = CreateObject("ADODB.Stream") s.Type = 2 s.Charset = "utf-8" s.Open s.WriteText "Field" & vbTab & "Value" & vbCrLf For Each cc In ActiveDocument.ContentControls label = cc.Tag If label = "" Then label = cc.Title If label = "" Then label = "Control-" & cc.ID value = cc.Range.Text label = Replace(Replace(Replace(label, vbTab, " "), vbCr, " "), vbLf, " ") value = Replace(Replace(Replace(Replace(Replace(value, vbTab, " "), vbCr, " "), vbLf, " "), Chr(7), " "), Chr(11), " ") s.WriteText label & vbTab & value & vbCrLf Next cc s.SaveToFile p, 1 s.Close MsgBox "Exported to " & p End Sub

3
Run the export

Return to the completed form in Word, press Alt+F8, select ExportContentControls, and click Run. The macro creates form-responses.txt in the document's folder. If that file already exists, rename or move it before running the macro.

4
Import the text into Excel

In Excel, choose Data > From Text/CSV and select form-responses.txt. Set the file origin to UTF-8 and the delimiter to Tab if needed, check the preview, and click Load.

Extract content control values with Word VBA
Review exported values: Control types can return different displayed text, so check the imported values, especially checkboxes and date controls. Run macros only when you trust the code and your organization's security policy permits them.
Free Microsoft Office alternative

Work with Word documents and Excel files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with documents and spreadsheets. Its Microsoft Office format support helps you move existing files into WPS, though it does not fix Word's content-control export behavior.

Open and review form documents and imported response spreadsheets in one office suite.Work with Microsoft Word DOCX and Excel XLSX formats.Use a familiar interface that makes switching from Microsoft Office easier.Access document and spreadsheet tools in a lightweight, free office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my Word form-data text file empty?

The form may use content controls rather than legacy form fields. Word's delimited form-data option may not export those controls. Use a VBA extraction method or save the complete document as plain text instead.

How do I give a content control a recognizable name?

In Word, select the content control and choose Developer > Properties. Enter a descriptive Tag or Title so an extraction script can associate the value with a field.

How do I open the exported UTF-8 file in Excel?

In Excel, select Data > From Text/CSV, choose the TXT file, and check that UTF-8 and the Tab delimiter are selected before clicking Load.

Will saving the form as a TXT file preserve its content controls?

No. Plain text contains text rather than interactive Word content controls. Keep the form in a Word document format and use the TXT file as a separate export.