Imports Docs.Word



Public Class Paragraphs_TabStops
	Friend Shared Function Main1() As Document
		'	Create a new document and gets first section
		Dim Doc As Document = Document.CreateNew()
		Dim Sect As Section = Doc.Sections(0)

		'	Create tab stops with given positions
		'	Alignment and Leader properties are set to default values
		Dim TabStops As New TabStops(150, 300)

		'	Also you can create tab stops with given parameters,
		'	specifying alignment, leader and positions as shown below in the commented line
		'TabStops TabStops = new TabStops(Alignment.Left, Leader.Dash, 150, 300);

		'	Add four paragraphs and sets their tab stops setting
		Dim Par1 As Paragraph = Sect.AddParagraph("Planet " & vbTab & " Diameter " & vbTab & " Distance from the Sun")
		Par1.Style.TabStops = TabStops
		Dim Par2 As Paragraph = Sect.AddParagraph("Mercury " & vbTab & " 4'880 " & vbTab & " 57'910'00")
		Par2.Style.TabStops = TabStops
		Dim Par3 As Paragraph = Sect.AddParagraph("Venus " & vbTab & " 12'103 " & vbTab & " 108'200'000")
		Par3.Style.TabStops = TabStops
		Dim Par4 As Paragraph = Sect.AddParagraph("Earth " & vbTab & " 12'756 " & vbTab & " 149'600'000")
		Par4.Style.TabStops = TabStops
		Dim Par5 As Paragraph = Sect.AddParagraph("Mars " & vbTab & " 6'794 " & vbTab & " 227'940'000")
		Par5.Style.TabStops = TabStops

		'	Make the first paragraph bold
		Par1.Textruns.Style.FontStyle.Bold = True

		Return Doc
	End Function
End Class
