IMa li neko funkciju za ovo, sa parametrima?
Uspeo sam da otvorim dokument na zadatoj stranici, ali ovode mi treba otvaranje na zadatom string.
Code:
Function Open_PDF_Page(strPath As String, intPageNum As Integer) As Boolean
Dim strReader As String
Dim strShell As String
'Loaction of Adobe Exe, i ovo bi mogao da bude parametar
strReader = "C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe /A"
'This works, but no page 4:
'strShell = """" & strReader & """ /A ""page=" & intPageNum & """ """ & strPath & """"
'This works and opens the document on given page:
strShell = strReader & " page=" & CStr(intPageNum) & " " & """" & strPath & """"
Debug.Print "strShell: " & strShell
Shell strShell, vbNormalFocus
End Function
'Ovo otvara PDF na strani 2, provereno, radi:
? Open_PDF_Page("J:\Policies and Procedures\BarCodes\BarCodeSpecs\BarcodeGeneration_Guidelines.pdf",2)
Function Open_PDF_Page(strPath As String, intPageNum As Integer) As Boolean
Dim strReader As String
Dim strShell As String
'Loaction of Adobe Exe, i ovo bi mogao da bude parametar
strReader = "C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe /A"
'This works, but no page 4:
'strShell = """" & strReader & """ /A ""page=" & intPageNum & """ """ & strPath & """"
'This works and opens the document on given page:
strShell = strReader & " page=" & CStr(intPageNum) & " " & """" & strPath & """"
Debug.Print "strShell: " & strShell
Shell strShell, vbNormalFocus
End Function
'Ovo otvara PDF na strani 2, provereno, radi:
? Open_PDF_Page("J:\Policies and Procedures\BarCodes\BarCodeSpecs\BarcodeGeneration_Guidelines.pdf",2)
