public void CreateWord(WordprocessingDocument package, ModelMemoReport template, object obj = null) { MainDocumentPart mainDocumentPart = package.AddMainDocumentPart(); DocumentFormat.OpenXml.Wordprocessing.Document document = new DocumentFormat.OpenXml.Wordprocessing.Document(); PageSetting settingPage = new PageSetting(); DocumentsFull documentInvoke = new DocumentsFull(); if (template.SelectParameterDocument.NumberDocument != 4) { Fotters footers = new Fotters(); footers.FottersAddDocument(mainDocumentPart, template.Executor.NameUser, template.Executor.Phone); document.Append(settingPage.AddSetting(mainDocumentPart)); document.Append(documentInvoke.CreateDocMemoReport(template)); } else { document.Append(settingPage.ParametrPageHorizontEditMargin(new PageMargin() { Top = 300, Right = 794, Bottom = 200, Left = 794, Header = 300, Footer = 700U, Gutter = 0U })); document.Append(documentInvoke.CreateDocMemoApplication(template)); } mainDocumentPart.Document = document; }