Button to Open a shortcut (1 Viewer)

Lochwood

Registered User.
Local time
Today, 10:48
Joined
Jun 7, 2017
Messages
130
I am using google chrome profiles and setting up about 15 profiles. each profile has a shortcut link that opens the webpage. Instead of having shortcuts on the desktop i thought i would create a form in access with buttons. each button will be linked to the corresponding shortcut.

cant get this working and keep getting file not found error.

the location of the shortcut and format is as follows.

c:\Database\shortcutname.ink (works if i paste this into a run command)


I have tried:
Application.FollowHyperlink "C:\database\Person3.ink

and also tried:
Dim stAppName As String

stAppName = "C:\database\Person3"
Call Shell(stAppName, 1)


For reference:
Actual value of the shortcut: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 3"

Hope you can help
 

isladogs

MVP / VIP
Local time
Today, 18:48
Joined
Jan 14, 2017
Messages
18,208
Sounds a slightly odd thing to do. What about user privacy setting?

Anyway, use the actual shortcut value in your application.followhyperlink code.

Once you get it working, I suggest you have a listbox and one button which gets the correct web address based on the listbox selection
 

Lochwood

Registered User.
Local time
Today, 10:48
Joined
Jun 7, 2017
Messages
130
Tried that

Application.FollowHyperlink "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" - -profile - directory = "Profile 3"

but get the error: Run-time error 13 type mismatch
 

isladogs

MVP / VIP
Local time
Today, 18:48
Joined
Jan 14, 2017
Messages
18,208
It will be an issue with quote marks.
I don't have anything similar to test. Try this:

Code:
Application.FollowHyperlink """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"" - -profile - directory = ""Profile 3"""

If it doesn't work, you'll need to play around some more
Is the double - - before profile correct?
 
Last edited:

Users who are viewing this thread

Top Bottom