This code uploads the file, but says its corrupted when openning in word, what am I doing wrong?
//Write Doc to stream
Stream docStream = mainDocPart.GetStream();
MemoryStream mStream = new MemoryStream();
StreamWriter sw = new StreamWriter(mStream);
byte contents = new byte[mStream.Length];
mStream.Read(contents, 0, (int)mStream.Length);
View Complete Post