Keep Original html body when forwarding an email

Status
Not open for further replies.

DAVID POWELL

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
This code is wiping out my original mail with text and html
I want to retain the original message and just add something at the top ?

add this : "This is Rejected"


Sub CommandButton6_click()

ChangeSubjectForward Item

End sub

Sub ChangeSubjectForward(Item)
Item.Subject = "Test"
Set myForward = Item.Forward
myForward.Recipients.Add "ccccc.ccccell@somewhere.com"
myForward.Body = "This is Rejected"
Item.Save
myForward.Send
End Sub

Thanks
david powell
 
Sub ChangeSubjectForward(Item)
Item.Subject = "Test"
Set myForward = Item.Forward
myForward.Recipients.Add "test@domain.com"
myForward.HTMLBody = "This is Rejected" & myForward.htmlbody
myForward.Send
End Sub

This seems to work
is there another way ?

Thanks
David Powell
 
Last edited by a moderator:
That is the easiest, most efficient way... you could use word vba to insert text before - an example code is here - Add Attachment Names to Message Before Sending

it's an additional 10 lines - i would probably only use it in your situation if the html body gets messed by the additional code. if you need an extra line between the text and the original body, try using either html tags or adding vbcrlf.
 
Diane,
Actually yes, i'm needing an extra line after:
myForward.HTMLBody = "This is Rejected" & myForward.htmlbody

Because I want it to read:

This is rejected

Blah blah blah blah

html stuff
 
Try using
myForward.HTMLBody = "<p>This is Rejected</p>" & myForward.HTMLBody

The sample with more space used the p tags, the top one is using your initial code. Using 2 <br /> tags is the same as using the p tags:
myForward.HTMLBody = "This is Rejected <br /><br />" & myForward.HTMLBody
samples.png
 
BTW, you can use html styles too - just use single quote, not double, with style:
myForward.HTMLBody = "<p style='color:red; font-size:18pt'>This is Rejected. </p><p>Try again. </p>" & myForward.HTMLBody
sample-2.png
 
this worked:
eBody = "I Have Reviewed and Approved the following pricing escalation." & "<br>" _
& "Please Review the Request and advise if you support the links below." & "<br>" _
& myForward.HTMLBody


Thanks for direction
dp
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
H Keep Original email unread after autoreply Outlook VBA and Custom Forms 2
R keep track of the original sender Outlook VBA and Custom Forms 3
V Outlook 2021 Can anyone explain why my Outlook views keep changing?! Using Outlook 2
C Why does Outlook (desktop) 365 for Windows keep making me input my passwords? Using Outlook 12
kburrows Reset Date to Keep Tasks from Archiving Using Outlook 9
T Why is every new email pinned (to keep it on top)? Windows 10 Using Outlook 6
T Missing text in e-mail message after "(Please keep confidential)" Using Outlook 3
CWM030 Outlook 2016 with imap emails keep Resurrecting themselves? Using Outlook 5
Scorpion New Contacts keep coming up as company Using Outlook 1
M Multiple workstations and multiple accounts - keep in sync? Using Outlook.com accounts in Outlook 2
M How to keep reccurence during copy tasks to calendar? Using Outlook 1
Patrick van Berkel Best way to share (and keep up-to-date) Macro's in Outlook 2010 Outlook VBA and Custom Forms 6
Karsten V Reminders keep popping up way after past reject Using Outlook 0
A Keep color categories when saving vCards Using Outlook 1
Mark Klaassen HOw to keep Outlook iCloud add-in enabled Using Outlook 4
R Can't keep emails synced on various devices Using Outlook.com accounts in Outlook 4
piusg 2013: Task Views keep disappearing Using Outlook 4
Dan Badur How can I keep indenting OFF on replies in Outlook 2013? Using Outlook 1
S how to keep "To" when move sent emails to other folder Using Outlook 1
K Deleted emails keep coming back Using Outlook 3
D Need Help with Script. Keep getting Runtime Error 438 BCM (Business Contact Manager) 4
A How to add personal notes to a meeting - and keep them if update sent? Using Outlook 1
A outlook trying to keep sending Using Outlook 1
B Closing Exchange service, how to keep all calendar and mail data? Exchange Server Administration 0
D How to keep Outlook 7 open to full screen Using Outlook 2
S How do I keep my old PST file as default Exchange Server Administration 1
Z Keep Unread Messages in same folder Using Outlook 2
L Oulook always "disconnected" how do I keep it open all of the time? Using Outlook 1
P emails with attachments keep sending... HELP!!! Using Outlook 4
F Not keep sort order after re-change column Using Outlook 1
M How do you keep sent emails in the PST folder in outlook 2013 Using Outlook 1
N Contact Groups - names keep changing from Contacts to AddressBook Using Outlook 5
M Reminders keep coming to users' calendar Exchange Server Administration 1
L Outlook 2010 - Keep getting "Corrupted File" Msgs Using Outlook 4
W Outlook 2010 Share calendar but keep color formatting Using Outlook 2
mrje1 Assigned Categories keep getting deleted in mail, bug? How to fix if possible? Using Outlook 5
S Reminders keep popping up, even after dismissing them Using Outlook 9
T Outlook keep loosing connection to the exchange server Using Outlook 1
P deleted items keep reappearing in my deleted folder Using Outlook 4
P Stationary and view layout keep changing after reboot? Using Outlook 1
Y MICROSOFT OUTLOOK 2007 - i KEEP GETTING THE "ENTER NETWORK PASSWORD" BOX POPPING UP - IT IS ALREADY Using Outlook 4
A How to keep all conversations expanded? Using Outlook 3
Q I cannot start Outlook 2007 I keep getting this error: __'Cannot start outlook window. Invalid XML,the view cannot be loaded.' Using Outlook 3
S Deleted messages keep coming back Using Outlook 7
A Keep format of message in the body Outlook VBA and Custom Forms 1
R How do I keep old calendar events from disappearing? BCM (Business Contact Manager) 2
C Reminders keep appearing without being requested BCM (Business Contact Manager) 4
D Outlook VBA forward the selected email to the original sender’s email ID (including the email used in TO, CC Field) from the email chain Outlook VBA and Custom Forms 3
J Quick steps delete original email and move reply/sent email to folder Using Outlook 2
F Forward incoming email with 4 embedded images in the body without original sender Outlook VBA and Custom Forms 22

Similar threads

Back
Top