本文整理汇总了C#中Document.AddNamespaceDeclaration方法的典型用法代码示例。如果您正苦于以下问题:C# Document.AddNamespaceDeclaration方法的具体用法?C# Document.AddNamespaceDeclaration怎么用?C# Document.AddNamespaceDeclaration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Document
的用法示例。
在下文中一共展示了Document.AddNamespaceDeclaration方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
Paragraph paragraph1 = new Paragraph(){ RsidParagraphAddition = "0008591D", RsidParagraphProperties = "009423EF", RsidRunAdditionDefault = "009423EF", ParagraphId = "0F416DF1", TextId = "77777777" };
BookmarkStart bookmarkStart1 = new BookmarkStart(){ Name = "_GoBack", Id = "0" };
BookmarkEnd bookmarkEnd1 = new BookmarkEnd(){ Id = "0" };
CommentRangeStart commentRangeStart1 = new CommentRangeStart(){ Id = "1" };
CommentRangeStart commentRangeStart2 = new CommentRangeStart(){ Id = "2" };
Run run1 = new Run();
RunProperties runProperties1 = new RunProperties();
RunFonts runFonts1 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
runProperties1.Append(runFonts1);
Text text1 = new Text();
text1.Text = "Test1";
run1.Append(runProperties1);
run1.Append(text1);
CommentRangeEnd commentRangeEnd1 = new CommentRangeEnd(){ Id = "1" };
Run run2 = new Run();
RunProperties runProperties2 = new RunProperties();
RunStyle runStyle1 = new RunStyle(){ Val = "a3" };
runProperties2.Append(runStyle1);
CommentReference commentReference1 = new CommentReference(){ Id = "1" };
run2.Append(runProperties2);
run2.Append(commentReference1);
CommentRangeEnd commentRangeEnd2 = new CommentRangeEnd(){ Id = "2" };
Run run3 = new Run();
RunProperties runProperties3 = new RunProperties();
RunStyle runStyle2 = new RunStyle(){ Val = "a3" };
runProperties3.Append(runStyle2);
CommentReference commentReference2 = new CommentReference(){ Id = "2" };
run3.Append(runProperties3);
run3.Append(commentReference2);
paragraph1.Append(bookmarkStart1);
paragraph1.Append(bookmarkEnd1);
paragraph1.Append(commentRangeStart1);
paragraph1.Append(commentRangeStart2);
paragraph1.Append(run1);
paragraph1.Append(commentRangeEnd1);
paragraph1.Append(run2);
paragraph1.Append(commentRangeEnd2);
paragraph1.Append(run3);
Paragraph paragraph2 = new Paragraph(){ RsidParagraphMarkRevision = "009423EF", RsidParagraphAddition = "009423EF", RsidParagraphProperties = "009423EF", RsidRunAdditionDefault = "009423EF", ParagraphId = "5C236322", TextId = "77777777" };
CommentRangeStart commentRangeStart3 = new CommentRangeStart(){ Id = "3" };
Run run4 = new Run();
RunProperties runProperties4 = new RunProperties();
RunFonts runFonts2 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
runProperties4.Append(runFonts2);
Text text2 = new Text();
text2.Text = "Test2";
run4.Append(runProperties4);
run4.Append(text2);
CommentRangeEnd commentRangeEnd3 = new CommentRangeEnd(){ Id = "3" };
Run run5 = new Run();
RunProperties runProperties5 = new RunProperties();
RunStyle runStyle3 = new RunStyle(){ Val = "a3" };
runProperties5.Append(runStyle3);
CommentReference commentReference3 = new CommentReference(){ Id = "3" };
run5.Append(runProperties5);
//.........这里部分代码省略.........
示例2: GenerateDocument
public static Document GenerateDocument()
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
DocumentBackground documentBackground1 = new DocumentBackground() { Color = "FF0000" };
V.Background background1 = new V.Background() { Id = "_x0000_s1025", BlackWhiteMode = Ovml.BlackAndWhiteModeValues.GrayScale, TargetScreenSize = Ovml.ScreenSizeValues.Sz1024x768 };
V.Fill fill1 = new V.Fill() { Type = V.FillTypeValues.Frame, Title = "Wedding_EnclosureCards", Recolor = true, Color = "FF0000" };
background1.Append(fill1);
documentBackground1.Append(background1);
Body body1 = new Body();
Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005F6C39", RsidRunAdditionDefault = "005F6C39" };
BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };
BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };
paragraph1.Append(bookmarkStart1);
paragraph1.Append(bookmarkEnd1);
SectionProperties sectionProperties1 = new SectionProperties() { RsidR = "005F6C39" };
PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U };
PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
Columns columns1 = new Columns() { Space = "720" };
DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };
sectionProperties1.Append(pageSize1);
sectionProperties1.Append(pageMargin1);
sectionProperties1.Append(columns1);
sectionProperties1.Append(docGrid1);
body1.Append(paragraph1);
body1.Append(sectionProperties1);
document1.Append(documentBackground1);
document1.Append(body1);
return document1;
}
示例3: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "002C2DE6", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" };
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0" };
Justification justification1 = new Justification() { Val = JustificationValues.Center };
ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
RunFonts runFonts1 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
Bold bold1 = new Bold();
FontSize fontSize1 = new FontSize() { Val = "30" };
paragraphMarkRunProperties1.Append(runFonts1);
paragraphMarkRunProperties1.Append(bold1);
paragraphMarkRunProperties1.Append(fontSize1);
paragraphProperties1.Append(spacingBetweenLines1);
paragraphProperties1.Append(justification1);
paragraphProperties1.Append(paragraphMarkRunProperties1);
Run run1 = new Run() { RsidRunProperties = "00417926" };
RunProperties runProperties1 = new RunProperties();
RunFonts runFonts2 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
Bold bold2 = new Bold();
FontSize fontSize2 = new FontSize() { Val = "30" };
runProperties1.Append(runFonts2);
runProperties1.Append(bold2);
runProperties1.Append(fontSize2);
Text text1 = new Text();
text1.Text = "Hard To Find Books";
run1.Append(runProperties1);
run1.Append(text1);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(run1);
Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" };
ParagraphProperties paragraphProperties2 = new ParagraphProperties();
SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0" };
Justification justification2 = new Justification() { Val = JustificationValues.Center };
ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
RunFonts runFonts3 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
Bold bold3 = new Bold();
FontSize fontSize3 = new FontSize() { Val = "30" };
paragraphMarkRunProperties2.Append(runFonts3);
paragraphMarkRunProperties2.Append(bold3);
paragraphMarkRunProperties2.Append(fontSize3);
paragraphProperties2.Append(spacingBetweenLines2);
paragraphProperties2.Append(justification2);
paragraphProperties2.Append(paragraphMarkRunProperties2);
Run run2 = new Run() { RsidRunProperties = "00417926" };
RunProperties runProperties2 = new RunProperties();
RunFonts runFonts4 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
Bold bold4 = new Bold();
FontSize fontSize4 = new FontSize() { Val = "30" };
runProperties2.Append(runFonts4);
runProperties2.Append(bold4);
runProperties2.Append(fontSize4);
Text text2 = new Text();
text2.Text = "Internet NZ Ltd.";
run2.Append(runProperties2);
run2.Append(text2);
paragraph2.Append(paragraphProperties2);
paragraph2.Append(run2);
Paragraph paragraph3 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" };
//.........这里部分代码省略.........
示例4: GenerateLabelsDocument
// Creates an Document instance and adds its children.
public void GenerateLabelsDocument(string fileName, List<Interview> candidateList)
{
Document document1 = new Document(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
DocumentFormat.OpenXml.Wordprocessing.Table table1 = new DocumentFormat.OpenXml.Wordprocessing.Table();
TableProperties tableProperties1 = new TableProperties();
DocumentFormat.OpenXml.Wordprocessing.TableStyle tableStyle1 = new DocumentFormat.OpenXml.Wordprocessing.TableStyle() { Val = "TableGrid" };
TableWidth tableWidth1 = new TableWidth(){ Width = "0", Type = TableWidthUnitValues.Auto };
TableBorders tableBorders1 = new TableBorders();
TopBorder topBorder1 = new TopBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
LeftBorder leftBorder1 = new LeftBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
BottomBorder bottomBorder1 = new BottomBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
RightBorder rightBorder1 = new RightBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
tableBorders1.Append(topBorder1);
tableBorders1.Append(leftBorder1);
tableBorders1.Append(bottomBorder1);
tableBorders1.Append(rightBorder1);
tableBorders1.Append(insideHorizontalBorder1);
tableBorders1.Append(insideVerticalBorder1);
TableLayout tableLayout1 = new TableLayout(){ Type = TableLayoutValues.Fixed };
TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault();
TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin(){ Width = 15, Type = TableWidthValues.Dxa };
TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin(){ Width = 15, Type = TableWidthValues.Dxa };
tableCellMarginDefault1.Append(tableCellLeftMargin1);
tableCellMarginDefault1.Append(tableCellRightMargin1);
TableLook tableLook1 = new TableLook(){ Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false };
tableProperties1.Append(tableStyle1);
tableProperties1.Append(tableWidth1);
tableProperties1.Append(tableBorders1);
tableProperties1.Append(tableLayout1);
tableProperties1.Append(tableCellMarginDefault1);
tableProperties1.Append(tableLook1);
table1.Append(tableProperties1);
TableGrid tableGrid1 = new TableGrid();
GridColumn gridColumn1 = new GridColumn(){ Width = "5760" };
GridColumn gridColumn2 = new GridColumn(){ Width = "270" };
GridColumn gridColumn3 = new GridColumn(){ Width = "5760" };
tableGrid1.Append(gridColumn1);
tableGrid1.Append(gridColumn2);
tableGrid1.Append(gridColumn3);
table1.Append(tableGrid1);
string sex = Sex.M.ToString();
Interview interview1, interview2;
BioData bioData1, bioData2;
for(int i = 0; i < candidateList.Count(); i=i+2)
{
interview1 = candidateList.ElementAt(i);
bioData1 = interview1.BioData;
if ((i + 1) < candidateList.Count())
{
interview2 = candidateList.ElementAt(i + 1);
bioData2 = interview2.BioData;
}
else
{
interview2 = null;
bioData2 = null;
}
DocumentFormat.OpenXml.Wordprocessing.TableRow tableRow1 = new DocumentFormat.OpenXml.Wordprocessing.TableRow() { RsidTableRowAddition = "003D48DC" };
TablePropertyExceptions tablePropertyExceptions1 = new TablePropertyExceptions();
TableCellMarginDefault tableCellMarginDefault2 = new TableCellMarginDefault();
TopMargin topMargin1 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
BottomMargin bottomMargin1 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
tableCellMarginDefault2.Append(topMargin1);
tableCellMarginDefault2.Append(bottomMargin1);
//.........这里部分代码省略.........
示例5: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
Table table1 = new Table();
TableProperties tableProperties1 = new TableProperties();
TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" };
TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto };
TableBorders tableBorders1 = new TableBorders();
TopBorder topBorder1 = new TopBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
tableBorders1.Append(topBorder1);
tableBorders1.Append(leftBorder1);
tableBorders1.Append(bottomBorder1);
tableBorders1.Append(rightBorder1);
tableBorders1.Append(insideHorizontalBorder1);
tableBorders1.Append(insideVerticalBorder1);
TableLayout tableLayout1 = new TableLayout() { Type = TableLayoutValues.Fixed };
TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault();
TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin() { Width = 15, Type = TableWidthValues.Dxa };
TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin() { Width = 15, Type = TableWidthValues.Dxa };
tableCellMarginDefault1.Append(tableCellLeftMargin1);
tableCellMarginDefault1.Append(tableCellRightMargin1);
TableLook tableLook1 = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false };
tableProperties1.Append(tableStyle1);
tableProperties1.Append(tableWidth1);
tableProperties1.Append(tableBorders1);
tableProperties1.Append(tableLayout1);
tableProperties1.Append(tableCellMarginDefault1);
tableProperties1.Append(tableLook1);
TableGrid tableGrid1 = new TableGrid();
GridColumn gridColumn1 = new GridColumn() { Width = "3787" };
GridColumn gridColumn2 = new GridColumn() { Width = "173" };
GridColumn gridColumn3 = new GridColumn() { Width = "3787" };
GridColumn gridColumn4 = new GridColumn() { Width = "173" };
GridColumn gridColumn5 = new GridColumn() { Width = "3787" };
tableGrid1.Append(gridColumn1);
tableGrid1.Append(gridColumn2);
tableGrid1.Append(gridColumn3);
tableGrid1.Append(gridColumn4);
tableGrid1.Append(gridColumn5);
table1.Append(tableProperties1);
table1.Append(tableGrid1);
var n = 0;
TableRow row = null;
foreach(var p in q)
{
if (n % 3 == 0)
{
if (row != null)
table1.Append(row);
row = EmployerAddressRow.AddPersonsRow();
}
row.AddPersonCell(p, addEmployer);
if (n % 3 < 2)
row.AddSpacerCell();
n++;
}
if (n % 3 != 0 && row != null)
table1.Append(row);
Paragraph paragraph54 = new Paragraph() { RsidParagraphMarkRevision = "005A43FA", RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" };
ParagraphProperties paragraphProperties54 = new ParagraphProperties();
Indentation indentation54 = new Indentation() { Left = "95", Right = "95" };
ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
Vanish vanish1 = new Vanish();
//.........这里部分代码省略.........
示例6: AddNamespaceDeclarations
public static void AddNamespaceDeclarations(Document document)
{
document.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
document.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture");
document.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
}
示例7: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document();
document1.AddNamespaceDeclaration("ve", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
Body body1 = new Body();
Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "006E2549", RsidRunAdditionDefault = "00E850CC" };
Run run1 = new Run();
Text text1 = new Text();
text1.Text = "This document contains content controls that will be bound to a custom XML part.";
run1.Append(text1);
paragraph1.Append(run1);
Paragraph paragraph2 = new Paragraph() { RsidParagraphAddition = "00E850CC", RsidRunAdditionDefault = "00E850CC" };
Table table1 = new Table();
TableProperties tableProperties1 = new TableProperties();
TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" };
TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto };
TableLook tableLook1 = new TableLook() { Val = "04A0" };
tableProperties1.Append(tableStyle1);
tableProperties1.Append(tableWidth1);
tableProperties1.Append(tableLook1);
TableGrid tableGrid1 = new TableGrid();
GridColumn gridColumn1 = new GridColumn() { Width = "1908" };
GridColumn gridColumn2 = new GridColumn() { Width = "4410" };
tableGrid1.Append(gridColumn1);
tableGrid1.Append(gridColumn2);
TableRow tableRow1 = new TableRow() { RsidTableRowAddition = "00E850CC", RsidTableRowProperties = "00E850CC" };
TableCell tableCell1 = new TableCell();
TableCellProperties tableCellProperties1 = new TableCellProperties();
TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "1908", Type = TableWidthUnitValues.Dxa };
tableCellProperties1.Append(tableCellWidth1);
Paragraph paragraph3 = new Paragraph() { RsidParagraphAddition = "00E850CC", RsidRunAdditionDefault = "00E850CC" };
Run run2 = new Run();
Text text2 = new Text();
text2.Text = "Name";
run2.Append(text2);
paragraph3.Append(run2);
tableCell1.Append(tableCellProperties1);
tableCell1.Append(paragraph3);
SdtCell sdtCell1 = new SdtCell();
SdtProperties sdtProperties1 = new SdtProperties();
SdtAlias sdtAlias1 = new SdtAlias() { Val = "Name" };
Tag tag1 = new Tag() { Val = "Name" };
SdtId sdtId1 = new SdtId() { Val = 13264407 };
SdtPlaceholder sdtPlaceholder1 = new SdtPlaceholder();
DocPartReference docPartReference1 = new DocPartReference() { Val = "DefaultPlaceholder_22675703" };
sdtPlaceholder1.Append(docPartReference1);
DataBinding dataBinding1 = new DataBinding() { XPath = "/Root/Name", StoreItemId = "{7776B924-6173-4963-94EF-05AF7A57A4C4}" };
SdtContentText sdtContentText1 = new SdtContentText();
sdtProperties1.Append(sdtAlias1);
sdtProperties1.Append(tag1);
sdtProperties1.Append(sdtId1);
sdtProperties1.Append(sdtPlaceholder1);
sdtProperties1.Append(dataBinding1);
sdtProperties1.Append(sdtContentText1);
SdtContentCell sdtContentCell1 = new SdtContentCell();
TableCell tableCell2 = new TableCell();
TableCellProperties tableCellProperties2 = new TableCellProperties();
TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "4410", Type = TableWidthUnitValues.Dxa };
tableCellProperties2.Append(tableCellWidth2);
Paragraph paragraph4 = new Paragraph() { RsidParagraphAddition = "00E850CC", RsidParagraphProperties = "00E850CC", RsidRunAdditionDefault = "00A539C5" };
Run run3 = new Run();
//.........这里部分代码省略.........
示例8: GeneratePartContent
// Generates content of part.
private static void GeneratePartContent(MainDocumentPart part)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
Paragraph paragraph5 = new Paragraph() { RsidParagraphMarkRevision = "00933EBD", RsidParagraphAddition = "00C20112", RsidParagraphProperties = "00C20112", RsidRunAdditionDefault = "00C20112" };
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Before = "480", Line = "360", LineRule = LineSpacingRuleValues.Auto };
Justification justification6 = new Justification() { Val = JustificationValues.Center };
OutlineLevel outlineLevel1 = new OutlineLevel() { Val = 0 };
ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
FontSize fontSize9 = new FontSize() { Val = "48" };
FontSizeComplexScript fontSizeComplexScript10 = new FontSizeComplexScript() { Val = "30" };
Underline underline2 = new Underline() { Val = UnderlineValues.Single };
paragraphMarkRunProperties1.Append(fontSize9);
paragraphMarkRunProperties1.Append(fontSizeComplexScript10);
paragraphMarkRunProperties1.Append(underline2);
paragraphProperties1.Append(spacingBetweenLines1);
paragraphProperties1.Append(justification6);
paragraphProperties1.Append(outlineLevel1);
paragraphProperties1.Append(paragraphMarkRunProperties1);
Run run5 = new Run() { RsidRunProperties = "00933EBD" };
RunProperties runProperties1 = new RunProperties();
FontSize fontSize10 = new FontSize() { Val = "48" };
FontSizeComplexScript fontSizeComplexScript11 = new FontSizeComplexScript() { Val = "30" };
Underline underline3 = new Underline() { Val = UnderlineValues.Single };
runProperties1.Append(fontSize10);
runProperties1.Append(fontSizeComplexScript11);
runProperties1.Append(underline3);
Text text1 = new Text();
text1.Text = "Memorandum";
run5.Append(runProperties1);
run5.Append(text1);
paragraph5.Append(paragraphProperties1);
paragraph5.Append(run5);
Paragraph paragraph6 = new Paragraph() { RsidParagraphAddition = "00C20112", RsidParagraphProperties = "00594F7D", RsidRunAdditionDefault = "00C20112" };
ParagraphProperties paragraphProperties2 = new ParagraphProperties();
WordWrap wordWrap1 = new WordWrap() { Val = false };
SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { Line = "360", LineRule = LineSpacingRuleValues.Auto };
Justification justification7 = new Justification() { Val = JustificationValues.Right };
ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
FontSize fontSize11 = new FontSize() { Val = "24" };
FontSizeComplexScript fontSizeComplexScript12 = new FontSizeComplexScript() { Val = "30" };
paragraphMarkRunProperties2.Append(fontSize11);
paragraphMarkRunProperties2.Append(fontSizeComplexScript12);
paragraphProperties2.Append(wordWrap1);
paragraphProperties2.Append(spacingBetweenLines2);
paragraphProperties2.Append(justification7);
paragraphProperties2.Append(paragraphMarkRunProperties2);
Run run6 = new Run();
RunProperties runProperties2 = new RunProperties();
FontSize fontSize12 = new FontSize() { Val = "24" };
FontSizeComplexScript fontSizeComplexScript13 = new FontSizeComplexScript() { Val = "30" };
runProperties2.Append(fontSize12);
runProperties2.Append(fontSizeComplexScript13);
Text text2 = new Text();
text2.Text = "Case No.:";
run6.Append(runProperties2);
run6.Append(text2);
Run run7 = new Run() { RsidRunAddition = "00594F7D" };
RunProperties runProperties3 = new RunProperties();
FontSize fontSize13 = new FontSize() { Val = "24" };
//.........这里部分代码省略.........
示例9: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
document1.Append(body1);
mainDocumentPart1.Document = document1;
}
示例10: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document();
document1.AddNamespaceDeclaration("ve", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
Body body1 = new Body();
Table table1 = new Table();
TableProperties tableProperties1 = new TableProperties();
TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" };
TableWidth tableWidth1 = new TableWidth() { Width = "9627", Type = TableWidthUnitValues.Dxa };
TableLook tableLook1 = new TableLook() { Val = "04A0" };
tableProperties1.Append(tableStyle1);
tableProperties1.Append(tableWidth1);
tableProperties1.Append(tableLook1);
TableGrid tableGrid1 = new TableGrid();
GridColumn gridColumn1 = new GridColumn() { Width = "9700" };
tableGrid1.Append(gridColumn1);
TableRow tableRow1 = new TableRow() { RsidTableRowAddition = "003F5FAE", RsidTableRowProperties = "00E67B26" };
TableRowProperties tableRowProperties1 = new TableRowProperties();
TableRowHeight tableRowHeight1 = new TableRowHeight() { Val = (UInt32Value)629U };
tableRowProperties1.Append(tableRowHeight1);
TableCell tableCell1 = new TableCell();
TableCellProperties tableCellProperties1 = new TableCellProperties();
TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "9627", Type = TableWidthUnitValues.Dxa };
tableCellProperties1.Append(tableCellWidth1);
Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "003F5FAE", RsidParagraphAddition = "003F5FAE", RsidParagraphProperties = "003F5FAE", RsidRunAdditionDefault = "003F5FAE" };
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Heading2" };
Justification justification1 = new Justification() { Val = JustificationValues.Center };
paragraphProperties1.Append(paragraphStyleId1);
paragraphProperties1.Append(justification1);
Run run1 = new Run() { RsidRunProperties = "003F5FAE" };
Text text1 = new Text() { Space = SpaceProcessingModeValues.Preserve };
text1.Text = "LOCUM ";
run1.Append(text1);
Run run2 = new Run() { RsidRunProperties = "003F5FAE" };
RunProperties runProperties1 = new RunProperties();
Color color1 = new Color() { Val = "1F497D", ThemeColor = ThemeColorValues.Text2 };
runProperties1.Append(color1);
Text text2 = new Text() { Space = SpaceProcessingModeValues.Preserve };
text2.Text = "Assistance ";
run2.Append(runProperties1);
run2.Append(text2);
Run run3 = new Run();
RunProperties runProperties2 = new RunProperties();
Color color2 = new Color() { Val = "1F497D", ThemeColor = ThemeColorValues.Text2 };
runProperties2.Append(color2);
Text text3 = new Text();
text3.Text = "–";
run3.Append(runProperties2);
run3.Append(text3);
Run run4 = new Run() { RsidRunProperties = "003F5FAE" };
RunProperties runProperties3 = new RunProperties();
Color color3 = new Color() { Val = "1F497D", ThemeColor = ThemeColorValues.Text2 };
runProperties3.Append(color3);
Text text4 = new Text() { Space = SpaceProcessingModeValues.Preserve };
text4.Text = " ";
run4.Append(runProperties3);
run4.Append(text4);
Run run5 = new Run();
RunProperties runProperties4 = new RunProperties();
//.........这里部分代码省略.........
示例11: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1, List<customSection> list)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
Paragraph paragraph25 = new Paragraph() { RsidParagraphAddition = "003C5001", RsidRunAdditionDefault = "003C5001" };
BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };
BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };
paragraph25.Append(bookmarkStart1);
paragraph25.Append(bookmarkEnd1);
SectionProperties sectionProperties1 = new SectionProperties() { RsidR = "003C5001" };
PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U };
PageMargin pageMargin1 = new PageMargin() { Top = 720, Right = (UInt32Value)720U, Bottom = 720, Left = (UInt32Value)720U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
Columns columns1 = new Columns() { Space = "720" };
DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };
sectionProperties1.Append(pageSize1);
sectionProperties1.Append(pageMargin1);
sectionProperties1.Append(columns1);
sectionProperties1.Append(docGrid1);
// -------------------------------------------------Insert table here------------------------------------------------------------
for (int i = 0; i < list.Count; i++)
{
if (list[i].Tab != null)
{
//Table table1 = generateRecommendationTable(list[i].Dt);
body1.Append(list[i].Tab);
}
else if (list[i].Xml != null)
{
for (int j = 0; j < list[i].Xml.Count; j++)
{
body1.Append(list[i].Xml[j]);
}
}
else if (list[i].Image != null)
{
body1.Append(addImage(list[i].Image.Filename, list[i].Image.Link));
}
else if (list[i].B != null)
{
body1.Append(list[i].B);
}
}
//body1.Append(paragraph25);
//body1.Append(sectionProperties1);
//NotesFor.HtmlToOpenXml.HtmlConverter htmlconv = new NotesFor.HtmlToOpenXml.HtmlConverter(mainDocumentPart1);
//var paragraphs = htmlconv.Parse(val);
//for (int i = 0; i < paragraphs.Count; i++)
//{
// body1.Append(paragraphs[i]);
//}
document1.Append(body1);
mainDocumentPart1.Document = document1;
}
示例12: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00365B67", RsidRunAdditionDefault = "00D831F8" };
Run run1 = new Run();
RunProperties runProperties1 = new RunProperties();
NoProof noProof1 = new NoProof();
runProperties1.Append(noProof1);
Drawing drawing1 = new Drawing();
Wp.Inline inline1 = new Wp.Inline() { DistanceFromTop = (UInt32Value)0U, DistanceFromBottom = (UInt32Value)0U, DistanceFromLeft = (UInt32Value)0U, DistanceFromRight = (UInt32Value)0U };
Wp.Extent extent1 = new Wp.Extent() { Cx = 5486400L, Cy = 3200400L };
Wp.EffectExtent effectExtent1 = new Wp.EffectExtent() { LeftEdge = 0L, TopEdge = 0L, RightEdge = 19050L, BottomEdge = 19050L };
Wp.DocProperties docProperties1 = new Wp.DocProperties() { Id = (UInt32Value)1U, Name = "Chart 1" };
Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties1 = new Wp.NonVisualGraphicFrameDrawingProperties();
A.Graphic graphic1 = new A.Graphic();
graphic1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
A.GraphicData graphicData1 = new A.GraphicData() { Uri = "http://schemas.openxmlformats.org/drawingml/2006/chart" };
C.ChartReference chartReference1 = new C.ChartReference() { Id = "rId7" };
chartReference1.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart");
chartReference1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
graphicData1.Append(chartReference1);
graphic1.Append(graphicData1);
inline1.Append(extent1);
inline1.Append(effectExtent1);
inline1.Append(docProperties1);
inline1.Append(nonVisualGraphicFrameDrawingProperties1);
inline1.Append(graphic1);
drawing1.Append(inline1);
run1.Append(runProperties1);
run1.Append(drawing1);
paragraph1.Append(run1);
Table table1 = new Table();
TableProperties tableProperties1 = new TableProperties();
TableWidth tableWidth1 = new TableWidth() { Width = "9527", Type = TableWidthUnitValues.Dxa };
TableBorders tableBorders1 = new TableBorders();
TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "AAAAAA", Size = (UInt32Value)6U, Space = (UInt32Value)0U };
LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "AAAAAA", Size = (UInt32Value)6U, Space = (UInt32Value)0U };
BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "AAAAAA", Size = (UInt32Value)6U, Space = (UInt32Value)0U };
RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "AAAAAA", Size = (UInt32Value)6U, Space = (UInt32Value)0U };
tableBorders1.Append(topBorder1);
tableBorders1.Append(leftBorder1);
tableBorders1.Append(bottomBorder1);
tableBorders1.Append(rightBorder1);
Shading shading1 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "F9F9F9" };
TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault();
TopMargin topMargin1 = new TopMargin() { Width = "15", Type = TableWidthUnitValues.Dxa };
TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin() { Width = 15, Type = TableWidthValues.Dxa };
BottomMargin bottomMargin1 = new BottomMargin() { Width = "15", Type = TableWidthUnitValues.Dxa };
TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin() { Width = 15, Type = TableWidthValues.Dxa };
tableCellMarginDefault1.Append(topMargin1);
tableCellMarginDefault1.Append(tableCellLeftMargin1);
tableCellMarginDefault1.Append(bottomMargin1);
tableCellMarginDefault1.Append(tableCellRightMargin1);
TableLook tableLook1 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true };
tableProperties1.Append(tableWidth1);
tableProperties1.Append(tableBorders1);
tableProperties1.Append(shading1);
tableProperties1.Append(tableCellMarginDefault1);
tableProperties1.Append(tableLook1);
//.........这里部分代码省略.........
示例13: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex");
document1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
document1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
document1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "009032DC", RsidParagraphAddition = "008129E8", RsidParagraphProperties = "009032DC", RsidRunAdditionDefault = "001D0DE9", ParagraphId = "0AAC1914", TextId = "772958DA" };
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Title" };
ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
Bold bold1 = new Bold() { Val = false };
FontSize fontSize1 = new FontSize() { Val = "72" };
paragraphMarkRunProperties1.Append(bold1);
paragraphMarkRunProperties1.Append(fontSize1);
paragraphProperties1.Append(paragraphStyleId1);
paragraphProperties1.Append(paragraphMarkRunProperties1);
BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };
BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };
Run run1 = new Run();
RunProperties runProperties1 = new RunProperties();
FontSize fontSize2 = new FontSize() { Val = "72" };
runProperties1.Append(fontSize2);
Text text1 = new Text();
text1.Text = "P";
run1.Append(runProperties1);
run1.Append(text1);
Run run2 = new Run() { RsidRunProperties = "009032DC", RsidRunAddition = "008129E8" };
RunProperties runProperties2 = new RunProperties();
FontSize fontSize3 = new FontSize() { Val = "72" };
runProperties2.Append(fontSize3);
Text text2 = new Text();
text2.Text = "roject:";
run2.Append(runProperties2);
run2.Append(text2);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(bookmarkStart1);
paragraph1.Append(bookmarkEnd1);
paragraph1.Append(run1);
paragraph1.Append(run2);
Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "009032DC", RsidParagraphAddition = "008129E8", RsidParagraphProperties = "009032DC", RsidRunAdditionDefault = "008129E8", ParagraphId = "0AAC1915", TextId = "5B14AE4B" };
ParagraphProperties paragraphProperties2 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId() { Val = "Title" };
ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
Bold bold2 = new Bold() { Val = false };
Color color1 = new Color() { Val = "FF0000" };
FontSize fontSize4 = new FontSize() { Val = "72" };
paragraphMarkRunProperties2.Append(bold2);
paragraphMarkRunProperties2.Append(color1);
paragraphMarkRunProperties2.Append(fontSize4);
paragraphProperties2.Append(paragraphStyleId2);
paragraphProperties2.Append(paragraphMarkRunProperties2);
Run run3 = new Run() { RsidRunProperties = "009032DC" };
RunProperties runProperties3 = new RunProperties();
Color color2 = new Color() { Val = "FF0000" };
FontSize fontSize5 = new FontSize() { Val = "72" };
runProperties3.Append(color2);
runProperties3.Append(fontSize5);
Text text3 = new Text() { Space = SpaceProcessingModeValues.Preserve };
//.........这里部分代码省略.........
示例14: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00570900", RsidParagraphAddition = "00082073", RsidParagraphProperties = "003627FC", RsidRunAdditionDefault = "003627FC" };
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0" };
ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
RunFonts runFonts1 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
FontSize fontSize1 = new FontSize() { Val = "26" };
paragraphMarkRunProperties1.Append(runFonts1);
paragraphMarkRunProperties1.Append(fontSize1);
paragraphProperties1.Append(spacingBetweenLines1);
paragraphProperties1.Append(paragraphMarkRunProperties1);
Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "00570900", RsidParagraphAddition = "003627FC", RsidParagraphProperties = "003627FC", RsidRunAdditionDefault = "003627FC" };
ParagraphProperties paragraphProperties2 = new ParagraphProperties();
SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0" };
ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
RunFonts runFonts3 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
FontSize fontSize3 = new FontSize() { Val = "26" };
paragraphMarkRunProperties2.Append(runFonts3);
paragraphMarkRunProperties2.Append(fontSize3);
paragraphProperties2.Append(spacingBetweenLines2);
paragraphProperties2.Append(paragraphMarkRunProperties2);
Run run2 = new Run() { RsidRunProperties = "00570900" };
Bold bold8 = new Bold();
RunProperties runProperties2 = new RunProperties();
RunFonts runFonts4 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
FontSize fontSize4 = new FontSize() { Val = customerDetailsFontSize };
runProperties2.Append(runFonts4);
runProperties2.Append(fontSize4);
runProperties2.Append(bold8);
Text text2 = new Text() { Space = SpaceProcessingModeValues.Preserve };
//TODO add in customer first Name
text2.Text = customer.firstName + " ";
run2.Append(runProperties2);
run2.Append(text2);
ProofError proofError1 = new ProofError() { Type = ProofingErrorValues.SpellStart };
Run run3 = new Run() { RsidRunProperties = "00570900" };
Bold bold9 = new Bold();
RunProperties runProperties3 = new RunProperties();
RunFonts runFonts5 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
FontSize fontSize5 = new FontSize() { Val = customerDetailsFontSize };
runProperties3.Append(bold9);
runProperties3.Append(runFonts5);
runProperties3.Append(fontSize5);
Text text3 = new Text();
//TODO add in customer last name
text3.Text = customer.lastName;
run3.Append(runProperties3);
run3.Append(text3);
ProofError proofError2 = new ProofError() { Type = ProofingErrorValues.SpellEnd };
paragraph2.Append(paragraphProperties2);
paragraph2.Append(run2);
paragraph2.Append(proofError1);
paragraph2.Append(run3);
paragraph2.Append(proofError2);
Paragraph paragraphInstitute = new Paragraph() { RsidParagraphMarkRevision = "00570900", RsidParagraphAddition = "003627FC", RsidParagraphProperties = "003627FC", RsidRunAdditionDefault = "003627FC" };
ParagraphProperties paragraphInstituteProperties = new ParagraphProperties();
//.........这里部分代码省略.........
示例15: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Body body1 = new Body();
var letter = ' ';
foreach (var f in q)
{
if (f.FamilyName[0] != letter)
{
letter = f.FamilyName[0];
body1.Append(f.AddAlphaRow());
}
body1.Append(f.AddPrimaryAdults(f.hasChildren || f.hasAddress || f.hasPhones || f.hasEmail));
if (f.hasChildren)
body1.Append(f.AddChildren(f.hasAddress || f.hasPhones || f.hasEmail));
if (f.hasAddress)
body1.Append(f.AddAddress(f.hasPhones || f.hasEmail));
if (f.hasPhones)
body1.Append(f.AddPhones(f.hasEmail));
if (f.hasEmail)
body1.Append(f.AddEmails());
}
SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "00E7001C", RsidR = "006324FB", RsidSect = "005F5A99" };
PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U };
PageMargin pageMargin1 = new PageMargin() { Top = 720, Right = (UInt32Value)720U, Bottom = 720, Left = (UInt32Value)720U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
Columns columns1 = new Columns() { Space = "432", ColumnCount = 3 };
DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };
sectionProperties1.Append(pageSize1);
sectionProperties1.Append(pageMargin1);
sectionProperties1.Append(columns1);
sectionProperties1.Append(docGrid1);
body1.Append(sectionProperties1);
document1.Append(body1);
mainDocumentPart1.Document = document1;
}