Welcome to OpenXML Developer Sign in | Join | Help

New to Open XML need help

Last post 10-07-2008, 4:30 AM by beast. 4 replies.
Sort Posts: Previous Next
  •  08-08-2008, 10:07 AM 3544

    New to Open XML need help

    Hey guys, My employer has picked up a job to write some apps to train users on how to use Office products, and has added me to the project team, anyways I don't really have any experience writing such an app being a web development firm, anyways too the point. We are writing our code in VB6, and I'm not sure how I go about using the WordProcessingML document to do things such as check if a certain image has been placed at the proper location in the document, or if text is wraped around the image correctly. Any help on places I can go to find more information or such on this subject would be great! So far all I've been able to find is information pertaining to working with Open XML on the web or with .NET I have yet to find anything to help me access the XML files in VB6 and check properties of elements in the document.

    Also we do not have Visual Studio which is why I'm not using that.
  •  08-08-2008, 10:49 AM 3545 in reply to 3544

    Re: New to Open XML need help

    Just talked some more with the boss about the project and were going to get Visual Studio 2008, I'm currently reading about this, but any additional resources you guys use would be appreciated to save me some time doing research so I can get to writing the code.
  •  08-11-2008, 10:31 AM 3554 in reply to 3545

    Re: New to Open XML need help

    Here are some interesting links that would help you understand how to work with Visual Studio and OpenXml documents :

    OpenXML Format SDK Documentation (a lot of "How To")
    Erika Ehrli Blog
    Manipulating XML Docs
    2007 Office System Sample : OpenXML file format Code snippets
    OpenXML Format SDK

    Regards
  •  08-12-2008, 2:25 PM 3565 in reply to 3554

    Re: New to Open XML need help

    Thanks for the help. I'm finally getting places with my program, can open a .docx and step through it to get the text i need, but now I've run into an issue with pictures. Here's what I have.

    User is given a task to insert an image on page 3 (paragrah 10) after the frist sentence and make it 3inchs by 3inchs.

    Once this is done the program then needs to check if the correct image was placed in the correct location in the document and that it is the correct size, and that is where I'm stuck.

    For jobs like that with text i am using InnerText, I tryed InnerXML but was unable to return anything other then the XML for the entire paragrah, and when i did XmlDocument.SelectNodes("//w:body/w:p[10]/w:pict") (to only select the XML in the pict namespace) it returned nothing.

    Can anyone point me in the right direction that i should be going to look for a picture in the document in a certain location with a certain name?

  •  10-07-2008, 4:30 AM 3760 in reply to 3565

    Re: New to Open XML need help

    Hi

     

    I think you can look in the direction of some third-party tool for processing OOXML documents. For example you can use Aspose.Words.

    http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/introducing-aspose-words.html

     

    Also note that Word documents do not contains information about document layout. So you can’t determine where page starts or ends. You can try using bookmark as a placeholder for inserting an image.

     

    WBR,

    Alex

View as RSS news feed in XML