princrai

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: GetXDocument fails for VMLPart. #3401

    princrai
    Participant

    Hi Eric,

    Thanks for the response. Basically as I mentioned in my earlier posts, we are using PresentationBuilder to extract objects out of it. We load the document and extract these object. I just got an document for which I am able to open in PowerPoint but when I ran through the PresentationBuilder it fails for that vml object. It will be great if you can let me know how I can either convert the vml into drawingxml(programmatically) or by any how hack the vml thing.

    Thanks,
    Prince

    in reply to: Create an Empty Slide. #3271

    princrai
    Participant

    Hi Eric,

    Looks like there is a small bug in the PresentBuilder Code. In the CopyMasterSlide function we are modifying the original Document master ids by below two lines.
    entry.Attribute(R.id).SetValue(newMaster.GetIdOfPart(newLayout));
    entry.SetAttributeValue(NoNamespace.smallid, newID.ToString());

    To fix this issue I just create independent copy of sourceMaster. Something like this.
    XDocument sourceMaster1 = sourceMasterPart.GetXDocument();
    XDocument sourceMaster = new XDocument(sourceMaster1);

    Can you check once if it is really a bug. Maybe this is not caught because we are calling this only once for each document. But in my case when I was calling it again and again for each object I found this issue.

    Thanks,
    Prince

    in reply to: Extract all charts and SmartArts from the Word Document. #2575

    princrai
    Participant

    Since my service will be just extracting objects from the document, I don’t think I will get a document that contain tracked revisions.
    Basically I have to make sure I get a paragraph with a run containing a drawing(for chart,smartart,images).To be on the safer side what I can do is,remove everything from the run except the run property(w:rPr) and the drawing Node(w:drawing) . I think this should work correctly.

    in reply to: Extract all charts and SmartArts from the Word Document. #2571

    princrai
    Participant

    Hi Eric,

    I was able to extract the table,smartart,chart,images from the Word document by doing some modification to the DocumentBuilder. So what I am doing is something this:

    1. Get all the paragraphs by filter by (W:p)
    2. From the above list get all the runs(W:r) from each of the above step 1.
    3. Create a new paragraph XElement(W:p) and add the above runs one by one and create the Document.

    Here are few things I am assuming are correct:
    1. Since Chart,SmartArt,Images are always put in W:drawing and a run(W:r), if contains a drawing it will not contain text or any other objects.
    2. For extracting all the chart,smartart,images, parsing a W:p is sufficient. Can the drawings can be present in any other nodes such as w:sdt,w:sdtContent,w:ins. Because I saw something like
    https://msdn.microsoft.com/en-us/library/ee836138(v=office.12).aspx
    <w:p/>
    <w:ins w:id=”16″w:author=”Eric White”w:date=”2009-08-29T06:47:00Z”>
    <w:p>
    <w:r>
    <w:t>This is another inserted paragraph.</w:t>
    </w:r>
    </w:p>
    </w:ins>
    <w:p/>

    in reply to: Extract all charts and SmartArts from the Word Document. #2560

    princrai
    Participant

    Thanks Eric for sharing the video links .

    But I have a little different scenario where suppose I have a paragraph in which I have a chart and a smartArt(which are basically drawing node in openxml) and want to shred these two objects individually to create two Word document, one containing the chart and the other containing the smartArt. I went through the DocumentBuilder code and looks like we mostly do all the processing over the paragraph and hence the chart and smartart goes into the same document.I wanted to check can we, by anyways shred these drawings and create a well formed document containining these drawings invidivually.

    Thanks,
    Prince

    in reply to: Create a new powerpoint document from a slide . #2536

    princrai
    Participant

    Thanks Eric for quick reply.

    There are couple of more question I have 🙂
    1. Wanted to check on the licence issues on using PowerTools.
    2. I am able to see the DocumentBuilder,PowerPointBuilder but no ExcelBuilder ?
    3. I have the scenarios where I have to covert the objects from one format to anther. For eg: I want to import table/smartart from Word Document to PPT Document and vice versa. Is there functionality available in the powertools. Or do I need to extend the functionality for it.

Viewing 6 posts - 1 through 6 (of 6 total)