
Set ts = fso.GetFile(TempFile).OpenAsTextStream(1, -2) Set fso = CreateObject("Scripting.FileSystemObject") 'Read all data from the htm file into RangetoHTML Source:=TempWB.Sheets(1).UsedRange.Address, _ Cells(1).PasteSpecial xlPasteFormats,, False, False Cells(1).PasteSpecial xlPasteValues,, False, False 'Copy the range and create a new workbook to past the data in HTMLBodyĪpplication.Calculation = xlCalculationAutomatic HTMLBody = strbody & RangetoHTML(rng) &. Subject = Sheets("Distribution List").Range("B2").Value ' "This is the Subject line" To = Sheets("Distribution List").Range("B3").Text Sheets("Distribution List").Range("A15").Value & "" Sheets("Distribution List").Range("A13").Value & "" & _ Sheets("Distribution List").Range("A11").Value & "" & _ Sheets("Distribution List").Range("A9").Value & "" & _ 'choose address from which you want to send your email on the behalf of Set rng = Sheets("Weekly scorecard").Range("B3:W114").SpecialCells(xlCellTypeVisible) Set OutMail = OutApp.CreateItem(olMailItem) Set OutApp = CreateObject("Outlook.Application") Sub Mail_Outlook_With_Signature_Html()Īpplication.Calculation = xlCalculationManual PS: All my formatted cells are in D column and the targets in question (the condition) are in my C column right beside it. Is it possible that it would need to do all those steps within the same workbook or am I missing something crucial? Like I said, everything is on point other than the formatting. I've read something about it having trouble due to copy pasting from my workbook/sheet to a temp Workbook and might cause a #REF! error somewhere but I can't figure it out as I'm very basic when it comes to VBA. I've exhausted web searches in finding a solution but when it's applied, my formatting doesn't follow to the email.

OUTLOOK CONDITIONAL FORMATTING ON SOURCE CODE CODE
I've got this code from the Ron De Bruin website and it's tweaked perfectly to my needs except for one thing.CONDITIONAL FORMATTING.my nemesis!!
