Hi, i´m a novice in this subject and I hope Diane can help me.
I have a code to open automaticly an email from a defined sender.
I´m having problems to join the code to click in a certain link. May I have your help please?
What I need is open the email when he arrives and click in the link in a defined text
I have this:
Public WithEvents objInbox As Outlook.Folder
Public WithEvents objInboxItems As Outlook.Items
Private Sub Application_Startup()
Set objInbox = Outlook.Application.Session.GetDefaultFolder(olFolderInbox)
Set objInboxItems = objInbox.Items
End Sub
'Occurs when incoming emails arrive in Inbox
Private Sub objInboxItems_ItemAdd(ByVal Item As Object)
Dim objMail As Outlook.MailItem
Dim strSenders As String
Dim varSenders As Variant
Dim i As Long
If TypeOf Item Is MailItem Then
Set objMail = Item
'Change the specific persons
strSenders = "Alijos@gmail.com"
varSenders = Split(strSenders, ";")
'Open the emails from specific persons
For i = 0 To UBound(varSenders)
If objMail.SenderEmailAddress = varSenders(i) Then
objMail.Display
Exit For
End If
Next
End If
End Sub
And what I need is to click automaticly in a link with the text "Fich a Subm Contab"
wayting for your help
I have a code to open automaticly an email from a defined sender.
I´m having problems to join the code to click in a certain link. May I have your help please?
What I need is open the email when he arrives and click in the link in a defined text
I have this:
Public WithEvents objInbox As Outlook.Folder
Public WithEvents objInboxItems As Outlook.Items
Private Sub Application_Startup()
Set objInbox = Outlook.Application.Session.GetDefaultFolder(olFolderInbox)
Set objInboxItems = objInbox.Items
End Sub
'Occurs when incoming emails arrive in Inbox
Private Sub objInboxItems_ItemAdd(ByVal Item As Object)
Dim objMail As Outlook.MailItem
Dim strSenders As String
Dim varSenders As Variant
Dim i As Long
If TypeOf Item Is MailItem Then
Set objMail = Item
'Change the specific persons
strSenders = "Alijos@gmail.com"
varSenders = Split(strSenders, ";")
'Open the emails from specific persons
For i = 0 To UBound(varSenders)
If objMail.SenderEmailAddress = varSenders(i) Then
objMail.Display
Exit For
End If
Next
End If
End Sub
And what I need is to click automaticly in a link with the text "Fich a Subm Contab"
wayting for your help