Convert XML files to a Word doc for easy editing and sharing
Beginning in 2010, Word no longer supports custom XML fields—you can still open and convert XML in Word, but custom fields will be removed. Fortunately, you there are other ways to convert XML to Word, and you can even add custom XML fields to a document manually if you're making a Word template. Read on to learn simple ways to convert XML to Word on any PC or Mac computer.
Easy Ways to Convert XML to Word
- If there's no custom fields, open the XML file in Word and save it as a DOCX file.
- To make a Word template from XML, you can map XML fields from a schema.
- Another option is to convert the XML to PDF, then use Google Drive to convert it to Word.
Steps
-
Open Microsoft Word on your PC or Mac. Microsoft Word versions released in 2010 and later (including Word 365) cannot read custom XML markup. [1] X Research source This method will only work if the XML you want to convert contains no custom ML elements, and you want to save the remaining XML as a Word document.
-
Click the File menu and select Open . You will see the File menu in the upper-left corner.
- You can also open the XML file by double-clicking its name in any folder on your computer.
Advertisement -
3Select the XML file you want to convert and click Open . Navigate to the file, then double-click to open it, or click the Open button.
- If you see a message that says "The file has custom XML elements that are no longer supported in Word," you can click OK on the message to continue, but you will lose any unsupported tags.
-
Click the File menu. It’s near the top-left corner.
-
Click Save As . If you don't see this option, choose Save as copy instead. [2] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
-
Click Browse (Windows only). This opens a file browser window.
-
Select Word Document from the “Save as type” or "File Format" menu. This ensures that the XML document will convert to the Word file format.
-
Click Save . The XML file has now been converted to a Word document.
Advertisement
-
1Open the XML file in any text editor. An easy way to convert XML to Word is to simply paste the contents of the XML file into a blank Word document. You can use any text editor, such as Notepad (Windows) or TextEdit (Mac), to open the XML file.
- An easy way to open the file: Right-click or control-click the XML file, select Open with , and choose either Notepad or TextEdit .
-
2Copy the entire XML file. To do this:
- Click anywhere in the file
- Select all text by pressing Ctrl + A (Windows) or Cmd + A (Mac).
- Copy the selection by pressing Ctrl + C (Windows) or Cmd + C (Mac).
-
3Open a blank Word document. If Word is already open, click the File menu, select New , then choose Blank document . If not, just launch Word and select Blank document .
-
4Paste the copied XML into the Word document. Click your mouse in the blank document, then press Ctrl + V (Windows) or Cmd + V (Mac) to paste it. You will then see the contents of the XML file.
-
5Click the File menu and select Save as . Alternatively, if Word is automatically backing up to OneDrive , select Save as copy instead.
-
Click Browse (Windows only). This opens a file browser window.
-
Select Word Document from the “Save as type” or "File Format" menu. This ensures that the XML document will convert to the Word file format.
-
Click Save . The XML file has now been converted to a Word document.
Advertisement
-
1Enable the Developer tab if you haven't already. If you need to insert XML into a Word document to create a template, you can do so easily as long as you have the XML schema files. If you don't already see the Developer tab in Word, here's how to enable it:
- Windows
- Click the File menu and select Options .
- Check the "Developer" box under "Customize the Ribbon."
- Mac
- Click the Word menu and select Preferences or Settings .
- Click Ribbon and Toolbar .
- Click Customize the Ribbon .
- Click Main Tabs .
- Check the "Developer" box and click Save . [3] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
- Windows
-
2Click the Developer tab and select Word Add-ins . This opens the "Templates and Add-ins" window.
-
3Click the XML Schema tab. Any attached XML schemas will appear.
-
4Click Add Schema… . This opens your file picker.
-
5Select the XML schema and click Open . This adds the schema.
- If the box isn't checked by default, check the box now. [4] X Research source
- Click OK when you're finished.
-
6Click XML Mapping Pane in the toolbar to enable the pane. This adds the XML mapping pane to the right side of Word, where you can now insert labels, fields, and other data.
-
7Select the Custom XML part you want to work with. Your enabled schemas appear in the list. When you make your selection, you'll see a list of fields.
- If you have any additional schema files you want to use, click the drop-down menu, select Add new part… , and select the XML or XSD file that contains the fields you need.
-
8Add XML fields to your Word document. To do this, just control-click or right-click a field, select Insert Content Control , and then choose how you want to add the field (e.g., Plain Text , Checkbox , etc.). Continue until you've added all the necessary fields from your XML into the Word document.
-
9Save your document as a template (optional). If your goal is to create a template others can use, you can save the document as a template file.
- Windows
- Click the File menu and select Save as (or Save as copy ).
- Double-click This PC .
- Type a name for the template.
- Select Word Template as the file type. Or, if there are macros in the document, select Word Macro-Enabled Document .
- Click Save .
- Mac
- Click the File menu and select Save as Template .
- Select Microsoft Word template (.dotx) as the file type, or Microsoft Word Macro-Enabled template (.dotm) if the file contains macros.
- Click Save . [5] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
- Windows
Advertisement
-
1Drag the XML file into any web browser. If you want to convert the XML into the Word .DOCX format, one workaround is first to create a PDF of the XML in your web browser, open the PDF in Word, and then convert that to the Word format.
- For example, open Chrome or Edge, then drag the XML document into the active window. This will open a new tab containing the contents of your XML file.
- In our testing, Microsoft Word struggled to convert the PDF to text. Google Docs worked great, so we recommend using it.
-
2Press Ctrl + P (Windows) or Command (Mac). This opens the Print window.
-
3Select the PDF option. If you're using Windows, select Microsoft Print to PDF as your printer. On a Mac, click the PDF button, or click the down-arrow on the PDF menu and select Save as PDF . [6] X Research source
-
4Save the file as a PDF. To do this, you'll "print" the file using these steps:
- On Windows, click the Print button to open the "Save Print Output As" window. Select a location to save the file to, name the file, and then click Save .
- On a Mac, enter a name for your file, select a location to save it to, and save the file.
-
5Upload the file to Google Drive. Here's how:
- Go to https://drive.google.com and log in with your Google account.
- Click + New and select File upload .
- Select your PDF and click Open .
- Once uploaded, the file will be listed in Google Drive.
-
6Open the PDF in Google Docs. To do this:
- Double-click the PDF file in your Google Drive.
- Click the Open with menu at the top.
- Select Google Docs . After a few moments, you will see the contents of the XML file.
-
7Convert the file to a Word document. Now, all you'll need to do is download the file in the DOCX format:
- Click the File menu and select Download .
- Choose Microsoft Word (*.docx) .
- Name the file and click Save .
- Once downloaded, you can open the file in Microsoft Word.
Advertisement
Expert Q&A
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
References
- ↑ https://learn.microsoft.com/en-us/office/troubleshoot/word/custom-xml-elements-not-supported
- ↑ https://support.microsoft.com/en-us/office/save-a-document-b7f55d8c-d714-4892-8fde-853a82419027
- ↑ https://support.microsoft.com/en-us/office/show-the-developer-tab-in-word-e356706f-1891-4bb8-8d72-f57a51146792
- ↑ https://projects.goamps.com/proliance/help/content/XML_Layout/How_to_Attach_an_XML_Schema_to_a_Word_Document.htm
- ↑ https://support.microsoft.com/en-us/office/create-a-template-86a1d089-5ae2-4d53-9042-1191bce57deb#OfficeVersion=macOS
- ↑ https://support.apple.com/guide/mac-help/save-a-document-as-a-pdf-on-mac-mchlp1531/mac
- ↑ https://www.vertopal.com/en/convert/xml-to-docx
About This Article
Article Summary
X
1. Open Word
.
2. Open the XML file.
3. Click File
.
4. Click Save As
.
5. Click Browse
.
6. Select Word Document
from the “Save as type” drop-down.
7. Click Save
.
Did this summary help you?
Thanks to all authors for creating a page that has been read 135,539 times.
Advertisement