MiyagiZama
New Member
- Joined
- Jul 26, 2023
- Messages
- 18
- Office Version
- 365
- Platform
- Windows
Hello mates, Its me again
I have a inconvenient with this run time error, in my macro which send emails, but when I try to change the font and font size, this error appears, as you know I'm newbie in this world, could you help me with this problem please? c:
This is the code and screenshot of the pop up message
I have a inconvenient with this run time error, in my macro which send emails, but when I try to change the font and font size, this error appears, as you know I'm newbie in this world, could you help me with this problem please? c:
This is the code and screenshot of the pop up message
VBA Code:
Sub combinacioncodigo()
'
' Declaramos variables
'
Dim OutlookApp As Outlook.Application
Dim MItem As Outlook.MailItem
Dim cell As Range
Dim Asunto As String
Dim BOL As String
Dim Msg As String
Dim MyFont
'
' Seleccionamos el rango de celdas a enviar Select
'
ActiveSheet.Range("A1:L42").Select
'
'
ActiveWorkbook.EnvelopeVisible = True
'
'
'Asignamos valor a las variables y llamamos al envio
'
'
With ActiveSheet.MailEnvelope
BOL = Format(ThisWorkbook.Sheets("BOL").Range("B3").Value, "#,##0")
MyFont.Size = 22
FechaVencimiento = Format(ThisWorkbook.Sheets("BOL").Range("C3").Value, "dd/mmm/yyyy")
.Item.To = ThisWorkbook.Sheets("ReporteFinal").Range("O3").Value
' ";" & ThisWorkbook.Sheets("ReporteFinal").Range("O4").Value & ";" & ThisWorkbook.Sheets("ReporteFinal").Range("O5").Value VOLVER A PEGAR ESTO
'.Item.cc = ThisWorkbook.Sheets("ReporteFinal").Range("O7").Value
'.Item.bcc = "correo2@dominio.com" 'con copia oculta a...
.Item.Subject = "Programacion Linea: "
.Introduction = "Apreciables colegas, espero que se encuentren excelente el dia de hoy. " & vbNewLine & vbNewLine & vbNewLine & vbNewLine & "El motivo de este correo es para informarle que tiene material en BOL desde el: " & FechaVencimiento & "." & vbNewLine & vbNewLine & vbNewLine & vbNewLine & "Favor de apoyarnos con el plan para disminuir el numero de estas piezas: " & BOL & vbNewLine & vbNewLine & "Atentamente:" & vbNewLine & "Departamento de programacion" & vbNewLine & vbNewLine & vbNewLine & "ESTO ES UNA PRUEBA FAVOR DE OMITIR"
.Item.Send
End With
End Sub