Sorry, forgot to mention the letter needs to be a Microsoft Word
Maybe you can use something like this.
You need a Word template with two bookmarks "companyname" and "contactname".
'Dim oDoc As Word.Document 'early binding
'Dim oWord As Word.Application 'early binding
Dim oDoc As Object 'late binding
Dim oWord As Object 'late binding
Set oWord = CreateObject("word.application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add("full path to your template")
If oWord.ActiveDocument.Bookmarks.Exists("companyname") = True Then
oWord.ActiveDocument.Bookmarks("companyname").range.Text = "the text
that goes in companyname"
End If
If oWord.ActiveDocument.Bookmarks.Exists("contactname") = True Then
oWord.ActiveDocument.Bookmarks("contactname").range.Text = "the text
that goes in contactname"
End If
Set oWord = Nothing
Set oDoc = Nothing
Jesper F, Denmark