I have a macro that generates an Outlook email based on information in the Excel spreadsheet. There are several string variables that are inserted into the body of the email based on specific conditions. One thing I have not been able to do is to transfer the table of information in the body of the email while maintaining order of the table.
I want to load a print screen of the table was but a stack overflow will allow me 10 just loaded me after the iconic table, however, is only 6X8 (Table Excel way I Range "U2: AB7").
The code I am using is as follows:
sub-e-mail () as the slow name 1 as the string dim name 2 string dim name 3 as string dim name 4 string dim 5th as string Dimam 1 as string demat 1 as string demat 2 as string dim DS as string dim string as demat 4 4 3 value name 2 = Range ("Nome 2") Value Name 3 = Range ("Nome 3") Value Name 4 = R Nj ( "Phnom 4"). Value Value = Category ("5th standard"). Value Year = Category ("Question 28") Value Standards = Category ("Q30") Value 1 part = category ("B3"). Value desc2 = Category ("B11") Value decl3 = Range ("B18") Value desc4 = Range ("B26") Value desc5 = Range ("B33"). Value Dim OutlookApp as Outlook.Application Dim MItem Outlook.mailitem as OutlookApp = Set New Outlook application if name = 3 then mailbase = "PRODUCT IDEA:" & amp; Year + "Yri Phoenix Autocal On" + Name 1 + "" + Name 2 + "" + 3 + Mailbody = "Bom Dia," & amp; VbNewLine & amp; VbNewLine & amp; "CEZEM OS Delitas Das Cousins Subjacentants and No Nightima." & Amp; VbNewLine & amp; VbNewLine _ & amp; Name 1 & amp; ":" & Amp; Desc1 & amp; VbNewLine & amp; VbNewLine & amp; Name 2 & amp; ":" & Amp; Desc2 & amp; VbNewLine & amp; VbNewLine & amp; Name 3 & amp; ":" & Amp; Desc3 ElseIf nomes = 5 Then mailbox = "PRODUCT IDEA:" & amp; Year + "Y. Phoenix Otokl on" + Name 1 + "" + 2 + name + "" + + 3 + "" + + 4 + "+ + 5 + 5 match =" Bom dia, "& amp; VbNewLine & amp ; VbNewLine & amp; "Siijem OS Dilitls slave Shazis Sbjatennts and no Naitima." & Amp; VbNewLine & amp; VbNewLine _ & amp; name 1 & amp; ":" & Amp; Desc1 & amp; VbNewLine & amp; VbNewLine & amp; name 2 & amp; ":" & Amp; Desc2 & amp; VbNewLine & amp; VbNewLine & amp; name 3 & amp; ":" & Amp; Desc3 & amp; VbNewLine & amp; VbNewLine _ & amp; name 4 & amp; ":" & Amp; Desc4 & amp; VbNewLine & amp; VbNewLine & amp; name 5 & amp; ":" & Amp; Desc5 and set MItem = MItem with OutlookApp.CreateItem (olmailitem). Subject = Mailsubject .. = "Recipient@xyz.com" .body = mailbody Save. Philosophy End
You can do it with HTML:
Comments
Post a Comment