Avatar of FaheemAhmadGul
FaheemAhmadGul
Flag for United Kingdom of Great Britain and Northern Ireland asked on

VBA Code to read from a simple XML file to create a collection of objects in Word VBA Project

I have a very simple XML file. In a VBA Project for Word, I would like to read from this XML file named VerySimple and create a collection of Book Objects based on a Book class in my project.
I would appreciate help with VBA code that would help me achieve that.
The xmle file looks like this:
<?xml version="1.0"?>
<catalog>
   <book id="1">
      <author>Gambardella, Matthew</author>
      <title>XML Developer's Guide</title>
   </book>
   <book id="2">
      <author>Ralls, Kim</author>
      <title>Midnight Rain</title>
   </book>  
</catalog>

Open in new window

Microsoft Office.NET ProgrammingXMLVBAMicrosoft Word

Avatar of undefined
Last Comment
FaheemAhmadGul

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
ste5an

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
FaheemAhmadGul

ASKER
Wonderful!!
Worked perfectly. Many thanks.
Your help has saved me hundreds of hours of internet surfing.
fblack61