Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

altChunk empty , not adding data to document

$
0
0

sharepoint 2010.   Trying to merge all docs in a document set. 

All I get in the result file is the inital template file (to which I (uncusscessfully) add the rest of the files via altChunk)

Used the msdn example from here to start: http://msdn.microsoft.com/en-us/library/office/ff519529(v=office.14).aspx

The mem below is getting data, but the parent.addafter isn't adding any data

mem.Write(byteArray, 0, (int)byteArray.Length);  //Gets data from the byteArray
mem.Seek(0,
SeekOrigin.Begin);
chunk.FeedData(mem);   <-I REALLY think THIS is failing to populate the chunk
}
AltChunk altChunk =newAltChunk();
altChunk.Id = altChunkId;

DocumentFormat.OpenXml.OpenXmlElement parent = sdt.Parent;
parent.InsertAfter(altChunk, sdt);  //THis altCHunk "inner text" is empty, and no data is written 


Viewing all articles
Browse latest Browse all 21115

Trending Articles