Imports Docs.Word



Public Class Tables_Style
	Friend Shared Function Main1() As Document
		'	Open a source document and gets both tables
		Dim Doc As Document = Document.ReadDoc(Form1.SourceFolder + "Tables - Style.doc")
		Dim Table1 As Table = DirectCast(Doc.Sections(0).Nodes(0), Table)
		Dim Table2 As Table = DirectCast(Doc.Sections(0).Nodes(2), Table)

		'	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
	End Function
End Class
