Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409

    open ms edge with a specific account


    hi, i use a lot of "application.followhyperlink" to open ms edge.
    I have two accounts in edge, it is possible to open edge with a specific account? i can't find anything on web

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You could use the Shell command instead with required profile?
    https://answers.microsoft.com/en-us/...9-9978e512f045
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    good idea. I'm not familiar with shell honestly, i tried those

    Code:
       shell("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe", --profile-directory=Profile 1)
    or

    Code:
       'CreateObject("Shell.Application").ShellExecute "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"  --profile-directory=Profile 1
    not working. hovwever, i want to open a specific link, beside opening a specific account

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Well the url follows the program command? Likely after the profile argument.
    Experiment in the immediate windo.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    i mean, i didn't try at all to start the url, those codes does not work, the line is red and i get the prompt. they cannot be written in that shape

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Well on the first one I'd expect everything to be within double quotes? Google the syntax. I am in a hospital car park, and cannot do too much on my phone, no Access access.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    i'm sorry, i hope everything is alright

    the only stuff working is

    Code:
       CreateObject("Shell.Application").ShellExecute "microsoft-edge:" & Me.Linkedin
    where "me.linkedin" is the url i want to open. I have to figure out how to select the edge profile i want

  8. #8
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    sorry, no one can help me? i'm putting code randomly with (unsurpriseling) without success

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by diegomarino View Post
    i'm sorry, i hope everything is alright

    the only stuff working is



    where "me.linkedin" is the url i want to open. I have to figure out how to select the edge profile i want
    Nothing wrong with me. I am a volunteer community driver and take people to hospital appointments, wait for them and take them home. While waiting, I tend to look at various forums on my phone, but am limited as to what I can do.

    From what I posted previously
    Code:
     shell("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe  --profile-directory=Profile 1 "  & Me.tstUrl)
    all of which can be tested in the immediate window I should expect?
    However you will need to locate where the profiles are stored?

    Open Edge and About and enter 'edge://version/' to get the profile path needed.

    https://docs.microsoft.com/en-us/dep...directory-vars

    Also look in Edge edge://settings/profiles/multiProfileSettings?search=profile
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    No idea how to do this, but that link is for a command line switch in a shortcut? Would not think that it's compatible syntax for vba.
    Maybe the solution is to run the shortcut instead of trying to code the profile choice?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  11. #11
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    thank you both, i can't even use the immediate windows, the line get red and i see the prompt. i dunno, maybe i'll search more in a more specific forum (if exist some shell forum :-D) then i'll post here

  12. #12
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by diegomarino View Post
    thank you both, i can't even use the immediate windows, the line get red and i see the prompt. i dunno, maybe i'll search more in a more specific forum (if exist some shell forum :-D) then i'll post here
    You can use the immediate window as soon as you open Access?
    Hard code the url for now, or set a a variable. For some reason I always use tt
    Code:
    tt="www.bb.co.uk"
    shell("C:\Program Files\Microsoft\Edge\Application\msedge.exe  --profile-directory=Profile 2 "  & tt)
    YOU ​however need to find out what profle you are using?

    I did discover that the url goes before the profile argument. https://stackoverflow.com/questions/...ipt-in-windows
    Code:
    C:\Program Files\Microsoft\Edge\Application\msedge.exe www.bbc.co.uk --profile-directory= Profile 1
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  13. #13
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    nothing, i'm trying some combination but i get always "file not found",the last one is:



    Code:
    Shell ("C:\Program Files\Microsoft\Edge\Application\msedge.exe https://stackoverflow.com/questions/ask --profile-directory= Profile 1")

  14. #14
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    WGM, have you actually got this to work in vba?

    EDIT this seems to work but in a couple of hours of testing I ended up creating a new profile. Not sure which one it's using, but my guess is that it's Profile 1

    Code:
    Function testEdgeProfile()
    Dim str As String
    str = """C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"" --profile-Directory=""Profile 1"""
    Debug.Print str
    
    Shell (str)
    
    End Function
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by diegomarino View Post
    nothing, i'm trying some combination but i get always "file not found",the last one is:

    Code:
    Shell ("C:\Program Files\Microsoft\Edge\Application\msedge.exe https://stackoverflow.com/questions/ask --profile-directory= Profile 1")
    YOU have to use the correct location of Edge?
    You had (x86) previously?, that does not exist on this laptop (32 bit), so I had to modify mine to as above. I got the same error when I tried your path?

    I am only trying to give you the logic, YOU have to adjust it to your circumtances.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Make an excel from an ms edge web select
    By diegomarino in forum Access
    Replies: 9
    Last Post: 06-28-2022, 10:54 AM
  2. Replies: 1
    Last Post: 04-06-2020, 02:52 AM
  3. Replies: 2
    Last Post: 06-27-2018, 02:27 PM
  4. Microsoft Edge and this forum
    By gem1204 in forum Access
    Replies: 3
    Last Post: 04-07-2016, 06:20 PM
  5. Replies: 1
    Last Post: 07-20-2012, 05:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums