Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-30-2020, 05:26 PM
macropod's Avatar
macropod macropod is offline VBA Script that can convert XML Files to Word Doc. Windows 7 64bit VBA Script that can convert XML Files to Word Doc. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,523
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


XML files contain a Document Type Descriptor (DTD) which defines its type. Evidently, the DTD for your xml file says it's type isn't one Word can open. One could open it as a plain text file, but all you'd see is the xml code - which I don't suppose would be very useful. You need to use whatever application this xml file type is supposed to be opened with.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 03-30-2020, 05:28 PM
Rolo18 Rolo18 is offline VBA Script that can convert XML Files to Word Doc. Windows 10 VBA Script that can convert XML Files to Word Doc. Office 2016
Novice
VBA Script that can convert XML Files to Word Doc.
 
Join Date: Mar 2020
Posts: 20
Rolo18 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
XML files contain a Document Type Descriptor (DTD) which defines its type. Evidently, the DTD for your xml file says it's type isn't one Word can open. One could open it as a plain text file, but all you'd see is the xml code - which I don't suppose would be very useful. You need to use whatever application this xml file type is supposed to be opened with.

Okay got it. Thank you again for all your help.
Reply With Quote
  #3  
Old 03-31-2020, 09:30 AM
Rolo18 Rolo18 is offline VBA Script that can convert XML Files to Word Doc. Windows 10 VBA Script that can convert XML Files to Word Doc. Office 2016
Novice
VBA Script that can convert XML Files to Word Doc.
 
Join Date: Mar 2020
Posts: 20
Rolo18 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
XML files contain a Document Type Descriptor (DTD) which defines its type. Evidently, the DTD for your xml file says it's type isn't one Word can open. One could open it as a plain text file, but all you'd see is the xml code - which I don't suppose would be very useful. You need to use whatever application this xml file type is supposed to be opened with.
So I download different XMLs from online examples and they were working.

One last question regarding my other XML files that I had and weren't working do you know of this code within an xml. When I delete the !DOCTYPE ddn the macro works, not 100% because it doesn't display it neatly but it does work. Do you know of a work around from the !doctype command that these xmls file have.


"<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE ddn> "

EDIT*

Now I'm noticing a trend. It always displays an error as shown above the picture I posted yesterday when it has the " !DOCTYPE "
But when I delete it off the code on the XML it converts it into a word document but it doesn't convert it perfectly. Any idea of how to get the macro working with this type of XML code?

XML file.txt

If it helps I attached the code of the XML file you just have to convert it back to XML format. Thank you
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
open custon files, convert to Word, print/save to PDF mgl_8 Word VBA 6 04-13-2018 03:38 PM
How can convert MSOffice .xml files to .doc or .pdf? FelipeGar Word VBA 5 06-05-2015 04:51 AM
Convert old PowerPC file to Intel-based files in Word? walmar Word 0 06-12-2013 07:07 AM
VBA Script that can convert XML Files to Word Doc. Convert word files to html including hyperlink file types MikS Word 3 06-12-2012 05:39 AM
Convert JML files Lundberg Word 5 09-11-2010 11:05 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:11 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft