The problem relates to a macro I'm trying to implement in Excel, specifically the shell function in the code. What the code does is that it executes chrome.exe opening a PDF file in a specific page of the document, the code is not mine it is from this post:
(Open a PDF from Excel with VBA in Google Chrome on a specific page)
and this is where I have the problem:
Dim arch As String
arch = "file:///C:\Users\user\Downloads\Trabajo.pdf#page=6"
If Not chromePath = "" Then
Shell ("""C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"" ""arch""")
End If
what i really need it to do is that the shell function opens chrome.exe and go to the path that is stored in the variable arch.
in the code that was posted it works this way:
Shell ("""C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"" ""file:///C:\Users\user\Downloads\Trabajo.pdf#page=6""")
I turned the PDF path into a variable since it will change on each PC I deliver the folder containing the excel document and the PDF
i have already managed how to get the PDF path to be read an put into the variable arch. I feel a bit embarrassed because this might be a really silly question. Thank you very much in advance.