Hallo Zusammen,
ich beschäftige mich mit der Einbindung mit MS Word. Nun die Basic hab ich ja schon , aber ich möchte die Shriftgrösse und Format unterschiedlich haben.
Das ist mein Basic Code:
ich beschäftige mich mit der Einbindung mit MS Word. Nun die Basic hab ich ja schon , aber ich möchte die Shriftgrösse und Format unterschiedlich haben.
Das ist mein Basic Code:
VB.NET-Quellcode
- Imports Excel = Microsoft.Office.Interop.Excel
- Imports Word = Microsoft.Office.Interop.Word
- Public Class Form1
- Dim ObjWord As Word.Application
- Dim ObjDoc As Word.Document
- Dim ObjExcel As Excel.Application
- Dim ObjXlt As Excel.Workbook
- Dim ObjPara As Word.Paragraph
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- ObjWord = CreateObject("Word.Application")
- ObjWord.Visible = True
- ObjWord.WindowState = Word.WdWindowState.wdWindowStateNormal
- ObjDoc = ObjWord.Documents.Add
- ObjPara = objDoc.Paragraphs.Add()
- ObjPara.Range.Text = "Test"
- ObjPara.Range.InsertParagraphAfter()
- End Sub
- End Class