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
 

DAVID POWELL

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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:

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 

DAVID POWELL

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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
 

DAVID POWELL

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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
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
O Wishlist Native solution to detach attachments but keep a link to them Outlook Wishlist 1
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
D Users changing domains within a corp, but need to keep old address. Using Outlook 2
C Keep personal maps structure when reopening OUTLOOK 2010 Using Outlook 1
A How to keep email in bold in OL 2010 Using Outlook 3
G Outlook keep prompt for log in credential Using Outlook 1
W Outlook 2010: Need to keep restarting outlook to download mail from a MAPI server Using Outlook 4
N Exchange 2010 RPC Over HTTPS, outlook keep trying port 135 Exchange Server Administration 9
S I keep getting a not responding message and a gray screen__when i change folders Using Outlook 3
C I want to KEEP ALL CALENDAR ITEMS FOREVER. Using Outlook 1
Y MICROSOFT OUTLOOK 2007 - i KEEP GETTING THE "ENTER NETWORK PASSWORD" BOX POPPING UP - IT IS ALREADY Using Outlook 4
R Pop up window keeps appearing telling me to enter my user name and password. Doing so does not make the windows go away, they just keep coming back. Using Outlook 1
R hosting a single domain name, but keep all users 'seperate' Exchange Server Administration 3
A Despite Windows Live Hotmail working as desired, I keep getting a message about 'Can't sign in' or Can't connect. This is the same with Outl Using Outlook 3
O OUTLOOK 2007: How do I keep email messages I am opening from jumping to the top of my inbox? Using Outlook 2

Similar threads

Top