Quote:
Originally Posted by Logit
|
Sub openPDFFileXPage()
Dim oShell As Object
Dim nPage As Integer
Set oShell = CreateObject("WScript.shell")
nPage = Application.InputBox("page£º")
With oShell
.Run """C:\Users\N. Gregory Mankiw - Principles Of Economics (2021, Cengage Learning) - libgen.lc.pdf""", 5, False
.Run """C:\Users\N. Gregory Mankiw - Principles Of Economics (2021, Cengage Learning) - libgen.lc.pdf""", 5, True
.SendKeys "^+N"
.SendKeys VBA.CStr(nPage)
.SendKeys "{ENTER}"
End With
Set oShell = Nothing
End Sub
how to modify this code let the code automating add the file?
C:\Users\N. Gregory Mankiw - Principles Of Economics (2021, Cengage Learning) - libgen.lc.pdf
like the file link address added in a dialogue box to select on pdf file the code add the link after run""?
thx