You could something like this: ' This is a action on pushing a button On Error GoTo Err_Knop40_Click Dim stDocName As String Dim stDocOntvanger As String Dim stDocFrom As String Dim stDocCC As String Dim stDocBcc As String Dim stDocOnderwerp As String Dim stDocText As String Dim stDocAfzender As String Dim Naam As String Dim I As Integer Dim strsql As String Dim EMAIL Dim rString As String * 255, sLen As Long, tString As String ' tString = "" sLen = GetUserName(rString, 255) sLen = InStr(1, rString, Chr(0)) ' If sLen > 0 Then ' tString = Left(rString, sLen - 1) ' Else ' tString = rString ' End If Naam = tString stDocName = "Empty_Report" stDocOntvanger = RTrim$(Me.EMAIL-address) stDocOnderwerp = "Subject....... " stDocText = "Hello " & RTrim$(Me.name) & " " & IIf(Left$(Me.subname, 1) = " ", "", RTrim$(Me.etc) & " ") & RTrim$(Me.othername) & "," stDocText = stDocText & vbCrLf & vbCrLf stDocText = stDocText & "With.........." & vbCrLf stDocText = stDocText & "....Greetings" & vbCrLf & vbCrLf stDocAfzender = "Sender......" & vbCrLf & vbCrLf stDocAfzender = stDocAfzender & ".......Website:" & vbTab & "www........" & vbCrLf ProviderIp = "192.168.0.0" ' whatever mailtext = stDocText & stDocAfzender Set EMAIL = CreateObject("cdo.message") Foutje = 0 With EMAIL stdDocFrom = RTrim(Name) & "@........" EMAIL.from = RTrim(Name) & "@........" EMAIL.To = stDocOntvanger EMAIL.CC = "" EMAIL.BCC = RTrim(BCCName) & "@......" 'For BCC purpose in a different folder ' EMAIL.Subject = stDocOnderwerp ' EMAIL.TextBody = mailtext ' Email.AddAttachment "C:\Scripts\Output.txt" ' If you would attachements to it If MsgBox(mailtext, vbOKCancel, "To: " + stDocOntvanger) = vbCancel Then GoTo Afgebroken_Knop40_Click I = 20 DoCmd.Hourglass True EMAIL.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 EMAIL.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = ProviderIp EMAIL.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 EMAIL.Configuration.Fields.Update