Vijay
Member
- Outlook version
- Outlook 2010 64 bit
- Email Account
Hi All,
my first post here,
i have this below code working great as it is searching email with subject line and replying to it.
the same task can i search by "Attachment name" and make reply ?
here is the code
Try
Dim olApp As Outlook.Application
Dim olNs As Outlook.NameSpace
Dim olMail As Outlook.MailItem
olApp = New Outlook.Application
olNs = olApp.GetNamespace("MAPI")
Dim Fldr As MAPIFolder
Fldr = olNs.GetDefaultFolder(OlDefaultFolders.olFolderInbox)
For Each olMail In Fldr.Items
If InStr(olMail.Submitted, TextBox1.Text) <> 0 Then
olMail.Display()
End If
Next olMail
Catch ex As System.Exception
MsgBox(Err.Description)
End Try
End Sub
my first post here,
i have this below code working great as it is searching email with subject line and replying to it.
the same task can i search by "Attachment name" and make reply ?
here is the code
Try
Dim olApp As Outlook.Application
Dim olNs As Outlook.NameSpace
Dim olMail As Outlook.MailItem
olApp = New Outlook.Application
olNs = olApp.GetNamespace("MAPI")
Dim Fldr As MAPIFolder
Fldr = olNs.GetDefaultFolder(OlDefaultFolders.olFolderInbox)
For Each olMail In Fldr.Items
If InStr(olMail.Submitted, TextBox1.Text) <> 0 Then
olMail.Display()
End If
Next olMail
Catch ex As System.Exception
MsgBox(Err.Description)
End Try
End Sub