private static OpenAndAddToWordprocessingStream ( Stream stream, string txt ) : void | ||
stream | Stream | |
txt | string | |
Résultat | void |
private static void OpenAndAddToWordprocessingStream(Stream stream, string txt)
{
WordprocessingDocument wordprocessingDocument =
WordprocessingDocument.Open(stream, true);
Body body = wordprocessingDocument.MainDocumentPart.Document.Body;
Paragraph para = body.AppendChild(new Paragraph());
Run run = para.AppendChild(new Run());
run.AppendChild(new Text(txt));
wordprocessingDocument.Close();
}
}