ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
THTom Helsley09/02/2013

Does anybody know if there is a way to access custom XML in MS Word (2007 & later) documents?

Because MS Word's document properties don't update in the fields without a macro, I’ve been doing a little research for a better solution .  I came across a couple interesting and potentially useful discussions.  The first one describes and demonstrates how to use XML documents in EPDM…

Joy Garon provided some links to using XML in word 2007 and later…

It was a good introduction to XML in Word documents, and the new content controls, but it didn’t explain how to bind custom XML data to the content controls in the documents.  Fortunately, the following link explained this well...

http://msdn.microsoft.com/en-us/library/bb264571.aspx (Mapping XML to content controls via VBA code)

Even better, the following link has a toolkit that will help users map XML to word documents without coding

http://dbe.codeplex.com/

In the above link, there is also a link to a (long) video that explains the toolkit and how it is used…

http://channel9.msdn.com/blogs/rory/matthew-scott-application-development-using-the-open-xml-file-formats

So, I tried it out using the toolkit and it works great in MS Word 2010!  The content updates without the headache of a custom update macro in every document.  The as soon as the XML data is changed the Word document shows those changes everywhere.

Now, the only problem I have is how to map variables in EPDM to the custom XML in MS Word.  If that can work, then a whole realm of possibilities opens up.   But nothing in the Administration Guide is mentioned  about mapping EPDM variables to custom XML data within MS Word. 

So, I am wondering, has anyone has figured out a way to map EPDM variables to custom XML data in MS word documents?