public void AddParagraph() { WordprocessingDocument word = WordProcessingExtensions.WordDocument(); word.AddParagraph(@"Parrado 1"); Assert.True(!word.IsNotValid()); }
/// <summary> /// Adds a set of paragraphs into the body of the given word document /// </summary> /// <param name="word">Word document reference</param> /// <param name="list">Collection of paragraphs</param> /// <returns>True or False</returns> public static void AddParagraphs(this WordprocessingDocument word, List <string> list) { if (word.IsNotValid() || list.IsNotValid()) { return; } for (int x = 0; x < list.Count; x++) { word.AddParagraph(list.ElementAt(x)); } }