-
I'm not sure why you are not getting what you want... I tried out the code and it did exactly what you said you wanted... created an email with the text written at the top, and the body of the email replied to at the bottom.... There were a few things there that weren't needed, so I took them out... Also, for testing purposes, you can use 'myreply.save' and comment out the mymail.delete lines, that way the email is not deleted, and the reply is not sent, just saved in Drafts for you to look at.
Here is the code that I ended up with:
[vba]
Sub When_will_my_item_get()
Dim myMail As Outlook.MailItem
Dim myReply As Outlook.MailItem
Dim numItems As Integer
Dim mySelected As Selection
Dim i As Integer
Dim myText As String
Stop
Set mySelected = Outlook.ActiveExplorer.Selection
numItems = mySelected.Count
For i = 1 To numItems
Set myMail = mySelected(1)
Set myReply = myMail.Reply
myText = myMail.Body
myReply.Subject = "Response to item tracking"
myText = "Hello," & vbCrLf
myText = myText & vbCrLf & "We can confirm that your item has been despatched, you should be receiving it within the next 2 - 5 working business days (excludes Saturday and Sundays). This is on the condition that:- We have received payment from your self - you'll have confirmation by email of this either by pay pal, eBay or our own website email If you paid by cheque or postal order please allow an additional 2 - 5 working days to allow the funds to clear."
myText = myText & vbCrLf & "Thank You"
myText = myText & vbCrLf & "Aftermarketsounds.com Team"
myText = myText & vbCrLf & "01723 81 81 35"
myText = myText & vbCrLf & "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
myReply.Body = myText & vbCrLf & myMail.Body
myReply.Send
myMail.Delete
Set myMail = Nothing
Set myReply = Nothing
Next
Set mySelected = Nothing
End Sub
[/vba]
Hope this helps.
GComyn
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules