Imam PDF dokumnet od 150,000 strana. Svaka strana predstavlja jedna dokument. Ne svakoj strani postoji devetocifreni broj, koji jednoznacno odredjuje stranu. Broj je odstampan u formatu "123-456-789". Moje pitanje je: kako otvoriti PDF iz Accesa, ako sam zadao path za PDF, na primer "C:\MyData\BigFile.PDF" i devetocifreni broj, na primer "308-427-911". Postoji tacno jedna strana u dokumentu na kojoj pise "308-427-911".
IMa li neko funkciju za ovo, sa parametrima?
Uspeo sam da otvorim dokument na zadatoj stranici, ali ovode mi treba otvaranje na zadatom string.
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)