why email doesn't show up in the right folder?

R

rocco

Hello,
this code is posted in my applicatione and it is supposed to create an email
message ready to be sent:

Dim objol As Outlook.Application
Set objol = New Outlook.Application
Dim myemail As Object
With objol
Set myemail = .CreateItem(olMailItem)
End With
With myemail
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "SELECT TOP 1 nameback,backupdate FROM u_users ORDER BY
u_users.backupdate DESC", CurrentProject.Connection, adOpenStatic,
adLockReadOnly
.Attachments.Add CurrentProject.Path & "\archivio_backup\" & rst.Fields(0)
rst.CLOSE
Set rst = Nothing
'.Attachments.Add CurrentProject.Path & "\backup.zip"
.To = "(e-mail address removed)"
.Subject = "Invio delle tabelle del database da: " & CurrentUser() & "
alle " & Now()
myemail.Save
MsgBox "The message is ready to be sent and it is located ion the draft
folder." + vbCrLf + _
"Please add all other info, if required, and then send the message. Thanks.
", vbInformation, "Message ready"
End With

It works perfectly...other than the saved message doesn't show up in the
DRAFT folder but in the INBOX (!).
Does someone know why? ANd how to have it saved in the DRAFt folder?

Thanks folks for any help...I'm going crazy with this.

Rocco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top