Print Page | Close Window

DAOpenFileReadOnly always returns zero

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1359
Printed Date: 22 Nov 24 at 1:44PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: DAOpenFileReadOnly always returns zero
Posted By: gregor1234
Subject: DAOpenFileReadOnly always returns zero
Date Posted: 03 Mar 10 at 5:41PM
Just downloaded the evaluation version of QuickPDF and am trying out the AxciveX version for use with MS Office VBA.
 
When I use DAOpenFIle everything wirks fine but if I use DAOpenFileReadOnly, I always get a returned a zero and Last Error Code is zero as well.
 
See the VB Sub below:
Sub TryOpenDA()
    Dim InFile As String, DA As Long, LE As Long
    Dim QP As QuickPDFAX0717.PDFLibrary
 
    Set QP = CreateObject("QuickPDFAX0717.PDFLibrary")
 
    If QP.UnlockKey(QPLicense) <> 1 Then
        Beep
        Call MsgBox("Invalid Quick PDF License=" & QPLicense, vbOKOnly + vbCritical, "Invalid License")
        Exit Sub
    End If
 
    InFile = "C:\Documents and Settings\coleg\My Documents\DB Play\Quick PDF Library 7.16 Reference Guide.pdf"
 
    'DA = QP.DAOpenFile(InFile, "") ' works just fine
    DA = QP.DAOpenFileReadOnly(InFile, "") ' never works
    LE = QP.LastErrorCode
   
    Call MsgBox("DA =" & Format(DA, "0") & ", LE =" & Format(LE, "0"), vbOKOnly, "DA Returned")
   
    QP.DACloseFile (DA)
       
    Set QP = Nothing
End Sub
 
AM I using it improperly?  Is there a problem with DAOpenFileReadOnly?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk