|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Word Automation, reading word document in XML formatI currently have a VB.NET application that interfaces with Word 2003 to produce documents from templates substituting the data in the template to form the document. This is all working including substituting images. However it is very slow as it uses the Word Object model to directly control the word.searchreplace function. I am now trying to change what we have so that it does the substitution in an XML formatted version of the word template document, which seems to be much easier. However, I now have a problem substituting images. The images in the word XML file are as below <w:binData w:name="wordml://02000001.jpg">/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB AQEBAQICAQECAQEBAgICAgICAgICAQICAgICAgICAgL/2wBDAQEBAQEBAQEBAQECAQEBAgICAgIC AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/wAARCAgABgADASIA etc.. My question is does anyone know what format the binary data is in? and how to convert it to an Image type in .NET? I have tried simple converting from a Base64 string then writing to a stream, then reading into an image but that does not work. Anyone any ideas? Any and all help much appreciated. R. |
|||||||||||||||||||||||