Hello,
I want to copy the body and subject of a current email and send it to different distribution list.
Here is what I found in this forum : I made some changes to adapt to my project.
Sub Old_reply()
Dim objApp
Dim objInsp
Dim Mail As Outlook.MailItem
On Error Resume Next
Set objApp = GetObject("", "Outlook.Application")
If objApp Is Nothing Then
Set objApp = Application.CreateObject("Outlook.Application")
End If
Set objInsp = objApp.ActiveInspector.CurrentItem
If TypeName(objInsp) = "Nothing" Then
MsgBox "No inspector window found"
Exit Sub
Else
Set Mail = Outlook.CreateItem(olMailItem)
With Mail
.To = "mymail@mymail.com"
.BCC = "List1"
.Subject = objInsp.Subject
.Body = objInsp.Body
.Send
End With
Set Mail = Nothing
Set Mail2 = Outlook.CreateItem(olMailItem)
With Mail2
.To = "mymail@mymail.com"
.BCC = "List2"
.Subject = objInsp.Subject
.Body = objInsp.Body
.Send
End With
Set Mail2 = Nothing
End If
End Sub
Problem : macro doesn't copy the subject line.
Can you help me ?
Thanks a lot in advance
Vince
I want to copy the body and subject of a current email and send it to different distribution list.
Here is what I found in this forum : I made some changes to adapt to my project.
Sub Old_reply()
Dim objApp
Dim objInsp
Dim Mail As Outlook.MailItem
On Error Resume Next
Set objApp = GetObject("", "Outlook.Application")
If objApp Is Nothing Then
Set objApp = Application.CreateObject("Outlook.Application")
End If
Set objInsp = objApp.ActiveInspector.CurrentItem
If TypeName(objInsp) = "Nothing" Then
MsgBox "No inspector window found"
Exit Sub
Else
Set Mail = Outlook.CreateItem(olMailItem)
With Mail
.To = "mymail@mymail.com"
.BCC = "List1"
.Subject = objInsp.Subject
.Body = objInsp.Body
.Send
End With
Set Mail = Nothing
Set Mail2 = Outlook.CreateItem(olMailItem)
With Mail2
.To = "mymail@mymail.com"
.BCC = "List2"
.Subject = objInsp.Subject
.Body = objInsp.Body
.Send
End With
Set Mail2 = Nothing
End If
End Sub
Problem : macro doesn't copy the subject line.
Can you help me ?
Thanks a lot in advance
Vince