Problem with opening hyperlinks in Excel directing to webpages with SSO cookies

Viewed 83

I am looking for a workaround in Excel that lets hyperlinks use the SSO cookies.

The problem

I have a hyperlink in Excel that links to a page that requires a login. Even though I am already logged in (there is a session cookie) on the new tab opened by the hyperlink, the page asks for my credentials again.

Making things worse, after manually logging again, it directs to the landing page, and not the original hyperlinked page.

The cause

From what I understand when looking around here, it works something like this:

When clicking the hyperlink Excel is going to a program behind the scenes (some user agent stuff? I have no idea what that means, i'm a programmer noob.)

There is checks if the URL is valid. It runs some checks, and that program tells Excel: "yup, this is good, go to this page."

As a result, it misses the already existing session cookie.

My suggested solution

What should solve the problem is: Click on hyperlink --> make new tab in browser --> just put the damn hyperlink into the URL. (Like how it should work? Why doesn't it work like this in the first place?)

Can someone help me to write a VBA file that does just that? (or come up with a different solution)

I can somewhat write my idea, I just don't know how the VBA in Excel works, and what the valid commands are.

Because this obviously doesn't work:

Sub WorkingHyperlink()
    When ClickOnCell(columnA)
    'Maybe this needs some i++ recursion so it works on every cell in column A, no clue.
    Do Open "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    Add URL, URL = hyperlink text

End Sub

Looking forward to learn from you.

0 Answers
Related