Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oMissing As Object = System.Reflection.Missing.Value Dim oEndOfDoc As Object = "\endofdoc" ' \endofdoc is a predefined bookmark 'Start Word and create a new document. Dim oWord As Word._Application Dim oDoc As Word._Document oWord = New Word.Application() oWord.Visible = True oDoc = oWord.Documents.Add(oMissing, oMissing, oMissing, oMissing) 'Insert a paragraph at the beginning of the document. Dim oPara1 As Word.Paragraph oPara1 = oDoc.Content.Paragraphs.Add(oMissing) oPara1.Range.Text = "Heading 1" oPara1.Range.Font.Bold = 1 oPara1.Format.SpaceAfter = 24 '24 pt spacing after paragraph. oPara1.Range.InsertParagraphAfter()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)