Public Class frmMain

    Dim WordApp As Word.Application = CreateObject("Word.Application")
    Dim WordDoc As Microsoft.Office.Interop.Word.Document

    Private Sub btnTjekStavning_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTjekStavning.Click
        Dim stavet As String = "Korrekt stavet."

        If WordApp.CheckSpelling(txtText.Text) = False Then
            stavet = "IKKE korrekt stavet, men jeg siger ikke hvad fejlen er."
        End If
        MessageBox.Show(stavet)
    End Sub

    Private Sub btnTjekGrammatik_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTjekGrammatik.Click
        Dim stavet As String = "Grammatik korrekt."

        If WordApp.CheckGrammar(txtText.Text) = False Then
            stavet = "IKKE grammatisk korrekt."
        End If
        MessageBox.Show(stavet)
    End Sub
End Class