Copy and paste body and subject and send multiple emails

Status
Not open for further replies.

VB NB

New Member
Outlook version
Outlook 2007
Email Account
POP3
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
 

VB NB

New Member
Outlook version
Outlook 2007
Email Account
POP3
I checked the code again and it seems to work now.
So ... problem resolved.

Thanks
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
As an FYI, because Outlook is open (you are working in it) you don't need to check for it.
Set objApp = Outlook.Application
Set objInsp = objApp.ActiveInspector.CurrentItem

If you were creating a message from Excel or Word, you'd use get/create object.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
H Macro to Copy Specific content from Mail Body and Paste to Excel Outlook VBA and Custom Forms 4
F I cannot highlight text in Microsoft Outlook 2010 e-mails, and copy/paste to the body of another e-m Using Outlook 3
Stilgar Relsik Create a rule to copy text from an email and paste it in the subject line. Using Outlook 1
A Outlook: copy & paste Outlook VBA and Custom Forms 9
G outlook 13 copy & paste without losing formatting Using Outlook 1
C Copy Cell value from Excel and paste into current email Outlook VBA and Custom Forms 10
R Copy/paste mailing address Outlook 2013 Using Outlook 6
D Open attached CSV, copy newdata and paste it to database CSV Outlook VBA and Custom Forms 2
O Copy email content and paste into new Word Document using a different font Using Outlook 1
L "sometimes" cant send mail, we have to copy and paste the message and resend? Using Outlook 2
S I'm not able to copy and paste on outlook. Using Outlook 1
M Outlook 2007 Copy-Paste problems Using Outlook 6
J cannot copy and paste while in list view in-cell editing Using Outlook 1
R how to copy a list of email contacts and paste them only as names (not names + email address) Using Outlook 12
K Copy Entire Email Content - Paste into new Task Outlook VBA and Custom Forms 2
K How to copy Contact Item to Clipboard and Paste as "VCF Link? Outlook VBA and Custom Forms 4
S Using copy paste to grab email addresses from the TO: address fiel Using Outlook 14
A Cannot copy this folder because it may contain private items Using Outlook 0
C Copy Move item won't work Outlook VBA and Custom Forms 2
B VBA to convert email to task, insert text of email in task notes, and attach copy of original email Outlook VBA and Custom Forms 4
Commodore Move turns into "copy" Using Outlook 3
C Copy Outlook contact field value to another field Outlook VBA and Custom Forms 1
J Copy to calendar function no longer working in outlook 365 Using Outlook 5
F Copy and replace not update contact in another pst Using Outlook 0
B Outlook Business Contact Manager with SQL to Excel, User Defined Fields in BCM don't sync in SQL. Can I use VBA code to copy 1 field to another? BCM (Business Contact Manager) 0
Commodore Folders always closed in move/copy items dialog box Using Outlook 3
N Outlook rules don't create a copy for bcc'ed emails Using Outlook 3
geofferyh Outlook 2010 How to Copy Outlook Attachment to a Specific Folder? Outlook VBA and Custom Forms 3
S Custom Form, copy user field data to message body Outlook VBA and Custom Forms 12
R Copy Outlook Public Folders to a File Server Shared Folder Using Outlook 0
K Outlook Rules: Move a Copy Using Outlook 4
oliv- HOW TO COPY /USE FOLDERS ICONS Outlook VBA and Custom Forms 2
E Copy e-mail body from outlook and insert into excel Outlook VBA and Custom Forms 3
B Copy/Move Exchange inbox to Pop inbox Using Outlook 4
R Sending email copy (*.msg file) of sent email if subject line contains specific string. Outlook VBA and Custom Forms 1
O Copy mails from many subfolders to 1 foldr Using Outlook 2
K ind specific Subject line from outlook and copy the content of the email body to exce Outlook VBA and Custom Forms 0
K How to find specific header and copy the mail body Using Outlook 0
J Copy or Export Outlook Mail to Excel Outlook VBA and Custom Forms 6
G Copy Contact field to Appointment Custom Form Field Outlook VBA and Custom Forms 2
G How to Copy Multi Select Listbox Data to Appointment Outlook VBA and Custom Forms 3
Carrie Dickey Outlook 2016 created two calendars titled Calendar1 - appear to be a copy Using Outlook 2
P How to copy and append data from Outlook 2016 message into Excel 2016 workbook Using Outlook 0
R Macro to copy email to excel - Runtime Error 91 Object Variable Not Set Outlook VBA and Custom Forms 11
M How to keep reccurence during copy tasks to calendar? Using Outlook 1
Diane Poremsky Copy New Appointments to Another Calendar using VBA New Slipstick.com Articles 0
Diane Poremsky Use a macro to copy data in Outlook email to Excel workbook New Slipstick.com Articles 0
C Copy Task to Non-Microsoft PIM "Rainlendar" Using Outlook 0
G VBA Copy draft email to a new email - attachments not copided Using Outlook 7
C Copy email to excel runtime error 5020 Using Outlook 5

Similar threads

Top