Eric White's Blog RSS icon RSS icon

Open XML, SharePoint, and Office

Open XML SDK

Back to TOCJust VideosCondensed TOC

.NET library for creating, querying, and modifying Open XML documents, spreadsheets, and presentations.

6 Responses to “Open XML SDK”

  • Soumyaranjanswain says:

    I have an application which generates output documents in MS Word and PDF format. PDF is generated from MS Word by using the Word 2007 Document.ExportAsFixedFormat method.
    The generated PDF doesn’t display the images which were placed in the Content Controls of the Word document.
    The word document generates perfectly with all the images and contents.
    Is there a way to fix this issue or is it possible to remove the content controls from the word document without removing the image inside it ?

    thanks,

    • Eric White says:

      Yes it certainly is possible. Best way to see the markup differences – use word to remove the content control and use the open xml sdk productivity tool to compare before and after removal.

      -Eric

  • Frank Roelofs says:

    Is there a way to programmaticaly change the relationship target in the file “settings.xml.rels” which resides inside the word folder in a docx file? It points to our old server and causes problems when opening these documents. (takes very long)

    Thanks,
    Frank

  • Frank Roelofs says:

    Thanks for your quick response. i’m defenitly going to look into that.
    I tried a quick test program, but it says it can’t find the relationship? Am i missing something?

    Frank


    class Program
    {
    static void Main(string[] args)
    {
    string fileName = @"E:\admin\Test.docx";

    using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(fileName, true))
    {
    MainDocumentPart mainPart = wordDoc.MainDocumentPart;
    ExternalRelationship relationship = mainPart.GetExternalRelationship("rId1");
    Console.WriteLine(relationship.Uri.ToString());
    }

    Console.Read();
    }

    }
    }

    /* the actual xml in the file word/_rels/settings.xml.rels

    */

  • Frank Roelofs says:

    sorry, here is the xml:
    Relationship TargetMode=”External” Target=”file:///\\T610-SBS-SRV\Public\Sjablonen\Word2007\Begeleidend%20schrijven.dotx”
    Type=”http://schemas.openxmlformats.org/officeDocument/2006/relationships/attachedTemplate” Id=”rId1″


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>