Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel email pdf button problem nicholas v Excel Discussion (Misc queries) 2 October 5th 09 09:44 PM
email problem in excel 2007 raja Excel Discussion (Misc queries) 1 March 10th 09 10:50 PM
email problem 1667Bob Setting up and Configuration of Excel 4 January 14th 09 10:21 PM
Problem with macro to email xls hnyb1 Excel Discussion (Misc queries) 5 June 19th 07 09:41 PM
Email and Excel Problem carl Excel Worksheet Functions 2 May 22nd 06 08:45 PM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"