Can't copy the document with AltChunk

Feb 9, 2010 at 9:55 PM

Using the sample code to copy the source document (source1) with AltChunk to another document (test3)

 

using (WordprocessingDocument part1 = WordprocessingDocument.Open("Source1.docx", false))
    {
          List<Source> sources = new List<Source>();
          sources.Add(new Source(part1, true));
          DocumentBuilder.BuildDocument(sources, "Test3.docx");
    }
 

No errors during execution, but the resulted "test3.docx" is broken - neither office nor SKD Productivity Tool can't open resulted file.

What can be the issue and are there any workarounds?!

using (WordprocessingDocument part2 = WordprocessingDocument.Open("Source1.docx", false))
            {
                List<Source> sources = new List<Source>();
                sources.Add(new Source(part1, true));

 

 

May 11, 2010 at 1:09 PM

Hi laflour,

Theres an issue with the versions when doing this, had the same problem.

You will need versions:

DocumentFormat.OpenXML Runtime: v2.0.50727 version 2.0.3302.0

WindowsBase Runtime v2.0.50727 version 3.0.0.0

and OpenXML.Powertools Runtime v2.0.50727 version 2.0.8.0

 

Guessing you've already sorted this but hope it helps anyone else.