How to open a specific link automatically with outlook 2016

Alipio

Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
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
 

Lewis-H

Senior Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Open hyperlink without holding Ctrl in Outlook
  1. On the File tab, click the Options button:
  2. In the Outlook Options dialog box, on the Mail tab, click the Editor Options button:
  3. In the Editor Options dialog box, on the Advanced tab, under Editing options uncheck Use CTRL+Click to follow hyperlink:
  4. Click OK.
 

Alipio

Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
Open hyperlink without holding Ctrl in Outlook
  1. On the File tab, click the Options button:
  2. In the Outlook Options dialog box, on the Mail tab, click the Editor Options button:
  3. In the Editor Options dialog box, on the Advanced tab, under Editing options uncheck Use CTRL+Click to follow hyperlink:
  4. Click OK.
Hi Lewis-H, thank you for your time. and what should I expect with this procedure?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You need to merge it with this code -

I think this will work - the pattern might need tweaked though.
.Pattern = "Fich a Subm Contab <(.*)>"

Copy one of the messages to the junk email folder and see how it looks in plain text - that is what you need the pattern to look like.
 

Attachments

  • openlink macro.txt
    1.7 KB · Views: 78

Alipio

Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
Diana, I don´t have word enough to thank you.... it works great.... you are really a GEM... but a big one.
 

amitkumarvinay

New Member
Outlook version
Outlook 2016 64 bit
Email Account
POP3
Hello Diane,

I do not have the access to update the registry to enable the "Run a script" option in Rules wizard. What are the alternate options to make this happen ? I want to be able to click on a link from a particular sender with a particular subject of the email everytime that emails comes to my inbox. Kindly please help
 
Similar threads
Thread starter Title Forum Replies Date
A How to open a specific link automatically with outlook Outlook VBA and Custom Forms 13
L Macro to Open a Specific Word Document - Outlook 2007 Using Outlook 17
C Want to Create Shortcut to Open Specific Calendars at the Same Time Using Outlook 2
X open specific e-mail messages in outlook 2007 c# Outlook VBA and Custom Forms 1
witzker Open Contact missing in Outlook 2019 Using Outlook 2
L Cannot open PST file for first session each day Using Outlook 6
H Upon opening Outlook, make my popmail inbox open instead of outlook.com inbox Using Outlook 1
sahameed82 SharePoint calendar directly open in Outlook Using Outlook 0
N .pst archive from work will not open/import on Microsoft 365 Exchange Server Administration 0
C Outlook 2016/2019 hangs after being open for an extended period Using Outlook 4
M Where is the setting to *turn off* open calendar in a new window? Using Outlook 3
W Automatically open attachments without automatically printing them Using Outlook 0
Y Open and Save Hyperlink Files in multiple emails Outlook VBA and Custom Forms 9
J How to open OST file in Outlook 2019 & 2016 Using Outlook 1
C Can't Open Outlook 365 Using Outlook 0
D after delete mail, open the next one Outlook VBA and Custom Forms 0
N VBA Script to Open highlighted e-mail and Edit Message Outlook VBA and Custom Forms 5
M outlook won't open! Using Outlook 1
N Open & Save VBAProject.Otm using VBA Code Outlook VBA and Custom Forms 1
E Unable to open Outlook 2010 after adding new email account Using Outlook 4
M other user's mailbox won't open, forms disappeared Using Outlook 42
S SendFromAccount - Problem trying to test existing value in open email Outlook VBA and Custom Forms 2
J Open an outlook email by Subject on MS Access linked table with VBA Outlook VBA and Custom Forms 10
D Add Tetxbox at form open Outlook VBA and Custom Forms 1
U Catching ModuleSwitch events after "open in new window" Outlook VBA and Custom Forms 2
Andrew Quirl Open attachment, manipulate without add-on program? Outlook VBA and Custom Forms 5
S Reminder Dialog Open Button Using Outlook 2
S Outlook 2010 Cannot Open Attachments Using Outlook 14
N open the hyperlink in Outlook directly instead of browser Using Outlook 1
S Outlook does not open the .pst file created by the Outlook Using Outlook 5
A open Outlook with multiple windows. Using Outlook 0
K open calendar from address book Outlook VBA and Custom Forms 1
T Double clik behavior on agenda open a new meeting request Using Outlook 1
E Open olNoteItem Attachment Outlook VBA and Custom Forms 6
G Can't open .pst. Message could not access default folder (Outlook 2010 (.pst). Before that was backi Using Outlook 0
I Outlook 2010, 2013 will not open .msg or .eml files Using Outlook.com accounts in Outlook 1
Diane Poremsky Outlook VBA: Work with Open Item or Selected Item New Slipstick.com Articles 0
O Windows 10 x64 Outlook 2013 - URL does not open (anymore) Using Outlook 3
Hudas VBA find and open an email without looping thru each email in the inbox Outlook VBA and Custom Forms 1
Diane Poremsky Rules & Alerts Dialog Won't Open New Slipstick.com Articles 1
Diane Poremsky Outlook 2013: Control Panel Mail Won't Open New Slipstick.com Articles 0
O Cannot open or save calendar items Using Outlook 0
Diane Poremsky Outlook Links Won't Open In Windows 10 New Slipstick.com Articles 1
C scanpst.exe will not open Using Outlook 0
K cant read email or open attachement Using Outlook 0
B ...administrator has limited the number of items you can open simultaneously Outlook VBA and Custom Forms 7
D Calendar view problems with reading pane open Using Outlook 0
Diane Poremsky Open a Webpage When a Task Reminder Fires New Slipstick.com Articles 0
B Open a folder / subfolder of a PST in single click Outlook VBA and Custom Forms 4
L Outlook 2013 won't open MS Office attachments Using Outlook 1

Similar threads

Top