Question email send un read email

Status
Not open for further replies.

Tamiryosef

Active member
Joined
May 2, 2022
Messages
36
Programming Experience
1-3
hello to all

i use VBA from Excel to send a email using outlook
i send for a PC that use outlook and the character at the body is ok and read ( i use Hebrew) , but when i send form my laptop that use Outlook 356 the body character is unreadable
my guess the problem Related to my laptop or outlook 356

this is the code you can see that body of the mail show her like i send on me laptop



email:
Sub Email_From_Excel_Basic()
    Dim emailApplication As Object
    Dim emailItem As Object
    Dim strPath As String
   
 
   
    ' Build the PDF file name
    strPath = ActiveWorkbook.Path & Application.PathSeparator & "Sheet1.pdf"
    ' Export workbook as PDF
    Worksheets("Invoice Template").ExportAsFixedFormat xlTypePDF, strPath
    Set emailApplication = CreateObject("Outlook.Application")
    Set emailItem = emailApplication.CreateItem(0)
    '
    emailItem.To = "test1@email.com"
    emailItem.CC = "test@email.com"
 emailItem.Subject = "äæîðä çãùä"
    emailItem.HTMLBody = "ùìåí øåðéú îá÷ù ìáöò äæîðä ìôé ä÷åáõ äîöåøó"
   
    emailItem.Attachments.Add strPath
   
   
    emailItem.Send
    MsgBox "Email send"

  
    'emailItem.Display
    Set emailItem = Nothing
    Set emailApplication = Nothing
  
    Kill strPath
    Workbooks("Invoice Template.xlsm").Close SaveChanges:=False
    ActiveWorksheet.Close SaveChanges:=False
    ActiveWorkbook.Close SaveChanges:=False
   
    For Each w In Application.Workbooks
    Next w
    Application.Quit
End Sub
 
Status
Not open for further replies.
Back
Top