Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
eMail problem
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 = " vSubject = "MXLibra Punten " & pTransfer & " toegestuurd door " & sParameters.[gUser] vBody = "Libra Punten " & pTransfer & " toegestuurd door " & sParameters.[gUser] vAttachment = pTransfer & ".gz" vReplyTo = " 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel email pdf button problem | Excel Discussion (Misc queries) | |||
email problem in excel 2007 | Excel Discussion (Misc queries) | |||
email problem | Setting up and Configuration of Excel | |||
Problem with macro to email xls | Excel Discussion (Misc queries) | |||
Email and Excel Problem | Excel Worksheet Functions |