View Single Post
 
Old 10-08-2020, 09:41 PM
leeqiang leeqiang is offline Windows 10 Office 2019
Advanced Beginner
 
Join Date: Aug 2020
Posts: 53
leeqiang is on a distinguished road
Default

Quote:
Originally Posted by Logit View Post



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
Reply With Quote