Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim X as Object
On Error Resume Next
X = GetObject("[b][i]Application.Name[/i][/b]")
If X is Nothing
'Application Not Running
Else
'Application Is Running
End
On Error Goto 0
Function pageCount(inputFile As String) As Integer
Dim pdfDoc As Object
On Error Resume Next
'Try to connect to an existing instance
[b]Set pdfDoc = GetObject(,"AcroExch.PDDoc")[/b]
'Test the connection
If pdfDoc Is Nothing Then
'If Not Found, Try to create a new instance
[b]Set pdfDoc = CreateObject("AcroExch.PDDoc")[/b]
End If
If pdfDoc Is Nothing Then Exit Function
'Try to Open the document
If pdfDoc.Open(inputFile) = False Then
'Return File Not Found Error
MsgBox "FileNotFoundException"
Exit Function
End If
' Get the number of pages
pageCount = pdfDoc.GetNumPages
On Error Goto 0
End Function