using System;
using System.Drawing;
using Docs.Word;


namespace SampleManager
{
	class Tables_Style
	{
		internal static Document Main1()
		{
			//	Open a source document and gets both tables
			Document Doc = Document.ReadDOC(Form1.SourceFolder + "Tables - Style.doc");
			Table Table1 = (Table)Doc.Sections[0].Nodes[0];
			Table Table2 = (Table)Doc.Sections[0].Nodes[2];

			//	Change style properties of 1st table
			Table1.Rows[0].Cells[0].Style.Shading = new Shading(Color.Yellow);
			Table1.Rows[1].Cells[1].Style.Shading = new Shading(Color.Tomato, Color.Violet, ShadingStyle.HorizontalStripe);
			Table1.Rows[1].Cells[0].Style.Borders.Bottom = new Border(2, Color.Blue);

			//	Change style properties of 2nd table
			Table2.Rows[0].Cells[0].Style.Width.Width = 240;
			Table2.Rows[1].Cells[1].Style.Borders = new Borders(3, Color.Red);

			return Doc;
		}
	}
}
