Sub BerichtCheckbox2(FolderName As String, FileName As String, Password As String)
Dim fso
Dim fol As String
Dim FileSaveName As String
Dim sUniekNummer As String
fol = "F:\L\Berichten\ASB\Nieuw"
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(fol) Then fso.CreateFolder (fol)
sUniekNummer = Format(Now(), "-(DDMMMMYYYY)")
FileSaveName = FolderName & FileName & sUniekNummer & ".doc"
Dim nd As New Document
With nd
nd.Activate
Selection.HomeKey wdStory
Selection.Font.Bold = wdToggle
Selection.Font.Underline = True
Selection.TypeText "U heeft bericht van:"
Selection.Font.Underline = False
Selection.Font.Bold = wdToggle
Selection.TypeText " "
Selection.TypeText txtNaam
Selection.TypeParagraph
Selection.TypeParagraph
Selection.Font.Bold = wdToggle
Selection.Font.Underline = True
Selection.TypeText "Verzonden op:"
Selection.Font.Underline = False
Selection.Font.Bold = wdToggle
Selection.TypeText " "
Selection.TypeText Format(Now, "d mmmm yyyy")
Selection.TypeParagraph
Selection.TypeParagraph
Selection.Font.Bold = wdToggle
Selection.Font.Underline = True
Selection.TypeText "Onderwerp:"
Selection.Font.Underline = False
Selection.Font.Bold = wdToggle
Selection.TypeText " "
Selection.TypeText txtOnderwerp
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeText txtBericht
Selection.TypeParagraph
If ChkLeesbevestiging = True Then nd.AttachedTemplate = "F:\L\Berichten\ASB\leesbevestiging.dotm"
.ReadOnlyRecommended = False
.Password = ""
.WritePassword = ""
nd.SaveAs FileSaveName
nd.Close
End With
End Sub