Hi, I have used the following code in a database. It opens an email fine but when I try and send it or close it, Access performs an illegal operation. Any ideas please?
Open "c:\TestFile.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, strText
if FullText<>"" then FullText=FullText & vbcrlf
FullText=FullText & strText
Loop
Close #1
DoCmd.SendObject , , , "bukhix@mydomain.com", , , "OptionalSubject", _
FullText, True
Also, Is there anyway of the email being sent automatically without me having to click send and be able to have a combo box appear to select an email address?
Open "c:\TestFile.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, strText
if FullText<>"" then FullText=FullText & vbcrlf
FullText=FullText & strText
Loop
Close #1
DoCmd.SendObject , , , "bukhix@mydomain.com", , , "OptionalSubject", _
FullText, True
Also, Is there anyway of the email being sent automatically without me having to click send and be able to have a combo box appear to select an email address?