Sajjad Haider
New Member
Code:
Option Explicit
Sub GetFromInbox()
Dim olApp As Outlook.Application
Dim olNs As Outlook.Namespace
Dim olFldr As Outlook.MAPIFolder
Dim olItms As Outlook.Items
Dim olMail AsVariantDim i AsLong
Set olApp =New Outlook.Application
Set olNs = olApp.GetNamespace("MAPI")Set olFldr = olNs.GetDefaultFolder(olFolderInbox).Folders("impMail")
Set olItms = olFldr.Items
olItms.Sort "Subject"
ForEach olMail In olItms If InStr(olMail.Subject,"SubjectoftheEmail")>0 Then
ThisWorkbook.Sheets("Fixings").Cells(2,2).Value = olMail.Body
EndIf
Next olMail
Set olFldr =Nothing
Set olNs =Nothing
Set olApp =Nothing
EndSub
This code help me to download whole body of the email but i need specific bold text in cells.The email body is as follows.
@ABC4: please add the following detail in system (for 12-Jan-2019):
12345_ABC_MakOpt --- 264532154.78
12345_ABC_GAPFee --- 145626547.80
Thanks
Last edited: