I am trying to automate the generation of slides in powerpoint using VBA. I would like to automatically get images from the web using edge navigator through msedgedriver. When I run my code in PowerPoint VBA, I receive the following error:

21 - Timeout error - The driver failed to open the listening port 127.0.0.1:57850 within 10s.

While debugging, the error is in the following line: driver.Start "edge", "C:\Users\vi\AppData\Local\SeleniumBasic\msedgedriver.exe"

While trying to solve the issue, I done the following already:

1 - certified that msedgedriver.exe is for ther current version of edge I am using;

2 - Deactivated my firewall and antivirus software;

3 - Certified the location of the msedgedriver.exe matches the location in the code to start the driver

Anybody has any ideas how to solve this? Worth pointing out that the code I am using was generated by chatGpt (i am a newbie in programming).

Here is the VBA powerpoint code up to the point where I have the error (with auto comments generated in Portuguese by ChatGpt):

Sub CriarSlidesDestinosComImagens()
Dim Destinos(5) As String
Dim Acomodacoes(5) As String
Dim i As Integer

' Definir os destinos e acomodações
Destinos(1) = "Porto Seguro, Brasil"
Acomodacoes(1) = "Porto Seguro Praia Resort hotel"

' Continue definindo os outros destinos e acomodações

' Crie uma instância do WebDriver
Dim driver As New WebDriver

' Inicialize o driver do Microsoft Edge (Chromium) com o caminho correto
driver.Start "edge", "C:\Users\helvi\AppData\Local\SeleniumBasic\msedgedriver.exe"
0

There are 0 best solutions below