Create a new Word document using VB.Net

This article describes how to create a new Word document using VB.Net.
follow these steps:
1. Start a new Windows application in language.
2. Add a reference to the Microsoft Word Object Library
3. Add a button to Form1 from Toolbox.
4. Double-click Button1, create a Button click event.
5. Write code on the click event of button:

 Private Sub CreateWordDocument()
        Dim objWord As Word.Application
        Dim objDoc As Word.Document
        objWord = CreateObject("Word.Application")
        objWord.Visible = True
        objDoc = objWord.Documents.Add
        'Insert some text in document
        Dim objPara As Word.Paragraph
        objPara = objDoc.Content.Paragraphs.Add
        objPara.Range.Text = "Welcome to Author Code"
        objPara.Range.Font.Bold = True
        objPara.Format.SpaceAfter = 30
    End Sub