from access to outlook 2

  • Thread starter Thread starter יריב החביב
  • Start date Start date
×

יריב החביב

Hello,

In order to send more then one file in mail

i got this code in previous question, here.

my question is how can i see the mail before sending it ?
and way i get error message 'user defined-type not defind' ?
(when i cancel the Dim statement, it work well)

Private Sub Command0_Click()
'Arvin Meyer 03/12/1999
'Updated 7/21/2001

Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.To = "(e-mail address removed)"
.Subject = "Look at this sample attachment"
.body = "The body doesn't matter, just the attachment"
.Attachments.Add "C:\Test.htm"
'.attachments.Add "c:\Path\to\the\next\file.txt"
.Send
'.ReadReceiptRequested
End With
Exit_Here:
Set objOutlook = Nothing
Exit Sub

End Sub
 
Back
Top