Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

Accessing XML file from Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jockster - 03 Apr 2006 20:55 GMT
Hi All

I am doing a project where I need to be able to associate keywords with
each paragraph I have in various Word documents. The keywords are
stored externally in an XML file.

I want document authors to be able to choose key words from the XML
file from within Word by running a Macro at the end of each paragraph.
This Macro should interogate the XML file and present the keywords to
select as a menu, with the nested nature of the keyword structure
presented as menus and sub-menu's.

I would be very grateful if someone could advise me if this is easily
possible and point me in the right direction as to where to start.

Thanks for any help given, Simon
Jonathan West - 03 Apr 2006 21:59 GMT
Hi jockster

The simplest thing to do is set a Reference in your project to a version of
the Microsoft XML document object library. If you open an XML file using
that, all the nodes are nicely mapped into objects and collections, so you
don't have to parse the XML file yourself.

The following link gives you a tutorial on using the Microsoft XML library

http://www.w3schools.com/xml/xml_parser.asp

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

> Hi All
>
[quoted text clipped - 12 lines]
>
> Thanks for any help given, Simon
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.