but I get the error
oIE.document.GetElementbyID("ctl00_cph_MAIN_ddlHCLaction").value = 83
Sub macro() Dim regex Set objOL = CreateObject("Outlook.Application") Set NewMail = objOL.ActiveExplorer.Selection.Item(1) NewMail.Display res = NewMail.Body Set regex = CreateObject("VBScript.RegExp") With regex .Global = False .MultiLine = False .IgnoreCase = True .Pattern = "HYPERLINK ""([^""]+?)""Click here to access enquiry" End With Set mtches = regex.Execute(res) If mtches.Count > 0 Then strHL = mtches(0).submatches(0) Set oIE = New InternetExplorerMedium oIE.navigate strHL, CLng(2048) oIE.Visible = True End If End Sub
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.