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 / July 2005

Tip: Looking for answers? Try searching our database.

Customizing Word 2003 for XML editing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Justin - 06 Jul 2005 22:03 GMT
I am attempting to make a change to Word to make it a better XML editor and I
haven't been able to find the information that I need. Currently when a
schema is provided to word it pays no attention to the minimum and maximum
number of occurences for any element. What I would like to do is when an
element has been added to the XML if it has reached the maximum numbers of
occurences then I want to remove it from the child nodes list because adding
another will cause the file to be invalid according to the schema. The list I
am referring to is in the lower left corner of Word and it is part of the XML
structure pane.  I believe an XML document must be open with an attached
schema for this list to be seen. I think I can gain access to the list using
the XMLChildNodeSuggestion object in VBA but this still leaves me with one
problem. I'm not sure how to figure out the min and max occurences. This is
my question , does anyone know how to use VBA or something else to access the
schema information so that I can remove elements from the list once they are
placed in the document the maximum number of times. I can think of atleast
one way to get around this but it would be quite ugly and possibly very slow.
Thank you in advance for any suggestions.
Cindy M  -WordMVP- - 07 Jul 2005 11:27 GMT
Hi =?Utf-8?B?SnVzdGlu?=,

You should probably ask this in the XML newsgroup. Phrase it such to ask if/how
you can use MSXML (that's a library to work with XML programatically) to access
a schema and get the max and min attributes for a particular element.

> I am attempting to make a change to Word to make it a better XML editor and I
> haven't been able to find the information that I need. Currently when a
[quoted text clipped - 12 lines]
> placed in the document the maximum number of times. I can think of atleast
> one way to get around this but it would be quite ugly and possibly very slow.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
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.