Hello everybody, need really your help
I'm trying to paste a range from excel into outlook and after this paste is done i want to include my signature in the e-mail. It is working but no in the correct order, the table is being pasted below the signature and i want it to be in the middle of the e-mail text (and i dont know why, when it pastes the table into the outlook it is creating a lot of blank lines below). Please see the code below:
Code
- With outlookmail
- .BodyFormat = olFormatHTML
- .Display
- .HTMLBody = "<font style=""font-family: Calibri; font-size: 11pt;""/font>" & responsavel & "!" & "<br>" & "<br>" & _
- "Segue status de despesas para o fechamento de " & mes & "/" & ano & _
- " para seu acompanhamento. Esses números estão publicados no Prophix e no FinD para eventuais consultas." & _
- "<br>" & "<br>" & "Anexo relatório com detalhamento desses números apresentados e com o extrato do centro de custo até o período atual, obtido através do sistema SAP." &"<br>" & "<br>" & "Att,"
- .To = Plan5.Range("B" & x).Value
- .CC = Plan5.Range("D" & x).Value
- .Subject = "Boletim de Despesas | Fechamento " & mes & "'" & Right(ano, 2)
- .Attachments.Add source_file
- Set xInspect = outlookmail.GetInspector
- Set pageEditor = xInspect.WordEditor
- Plan1.Range("A1:H" & Range("H100000").End(xlUp).Row).Copy
- pageEditor.Application.Selection.Start = Len(.Body)
- pageEditor.Application.Selection.End = pageEditor.Application.Selection.Start
- pageEditor.Application.Selection.Paste (wdFormatPlainText)
- Set pageEditor = Nothing
- Set xInspect = Nothing
- .Send
- End With
Thank you!!!