J
Jos Vens
I have 2 questions:
- mail via Outlook Express with compression works but the attachment is not
added
- the reply to option in Outlook (eMail.ReadReceiptRequested = vReplyTo)
gives an error
Can you help me?
Thanks
Jos Vens
here's my code
Function MAIL_Mail() '(vFile As String) 'vFile = Bestandsnaam, zonder
extensie van het bestand
Dim oOutlook ', vMapi
Set oOutlook = CreateObject("Outlook.Application")
'Set vMapi = oOutlook.GetNameSpace("MAPI")
Set eMail = oOutlook.CreateItem(0)
vRecipient = "(e-mail address removed)"
vSubject = "MXLibra Punten " & pTransfer & " toegestuurd door " &
sParameters.[gUser]
vBody = "Libra Punten " & pTransfer & " toegestuurd door " &
sParameters.[gUser]
vAttachment = pTransfer & ".gz"
vReplyTo = "(e-mail address removed)"
Select Case sParameters.[nMX]
Case 1 'Outlook
eMail.Recipients.Add (vRecipient)
eMail.Subject = vSubject
eMail.Body = vBody
eMail.Attachments.Add (pFTransfer & vAttachment)
' eMail.ReadReceiptRequested = vReplyTo
eMail.Send
' Shell sParameters.[pFileMX], vbMaximizedFocus
Case 2 'Outlook Express with compression
vMail = "mailto:" & vRecipient & "?subject=" & vSubject & "&body="
& vBody & "&attachment=" & pFTransfer & vAttachment
ActiveWorkbook.FollowHyperlink vMail
Case 3 'Outlook Express without compression
Workbooks.Open (pTransfer & vExt), False, True
Windows(vFile & vExt).Visible = False
Workbooks(vFile & vExt).SendMail vRecipient, "Libra Punten " &
vFile & " (" & vVak & ") toegestuurd door " & sParameters.[gUser], True
Workbooks(vFile & vExt).Close SaveChanges:=False
Shell sParameters.[pFileMX], vbMaximizedFocus
End Select
End Function
- mail via Outlook Express with compression works but the attachment is not
added
- the reply to option in Outlook (eMail.ReadReceiptRequested = vReplyTo)
gives an error
Can you help me?
Thanks
Jos Vens
here's my code
Function MAIL_Mail() '(vFile As String) 'vFile = Bestandsnaam, zonder
extensie van het bestand
Dim oOutlook ', vMapi
Set oOutlook = CreateObject("Outlook.Application")
'Set vMapi = oOutlook.GetNameSpace("MAPI")
Set eMail = oOutlook.CreateItem(0)
vRecipient = "(e-mail address removed)"
vSubject = "MXLibra Punten " & pTransfer & " toegestuurd door " &
sParameters.[gUser]
vBody = "Libra Punten " & pTransfer & " toegestuurd door " &
sParameters.[gUser]
vAttachment = pTransfer & ".gz"
vReplyTo = "(e-mail address removed)"
Select Case sParameters.[nMX]
Case 1 'Outlook
eMail.Recipients.Add (vRecipient)
eMail.Subject = vSubject
eMail.Body = vBody
eMail.Attachments.Add (pFTransfer & vAttachment)
' eMail.ReadReceiptRequested = vReplyTo
eMail.Send
' Shell sParameters.[pFileMX], vbMaximizedFocus
Case 2 'Outlook Express with compression
vMail = "mailto:" & vRecipient & "?subject=" & vSubject & "&body="
& vBody & "&attachment=" & pFTransfer & vAttachment
ActiveWorkbook.FollowHyperlink vMail
Case 3 'Outlook Express without compression
Workbooks.Open (pTransfer & vExt), False, True
Windows(vFile & vExt).Visible = False
Workbooks(vFile & vExt).SendMail vRecipient, "Libra Punten " &
vFile & " (" & vVak & ") toegestuurd door " & sParameters.[gUser], True
Workbooks(vFile & vExt).Close SaveChanges:=False
Shell sParameters.[pFileMX], vbMaximizedFocus
End Select
End Function