Attribute VB_Name = "basMain" Option Explicit Public Sub Main() Debug.Print ("---------------------------------------------------------") Debug.Print ("PDFTron PageMaster Test") Debug.Print ("Copyright (c) 2003-2008 PDFTron Systems Inc.") Debug.Print ("---------------------------------------------------------") Dim ret As Integer ret = PageMasterInit("John Doe", "My Company", "my license key") ret = PageMasterRun("-s --digits 2 -o ../TestOutput/test1/ ../TestFiles/bookmark.pdf", ByVal 0&, ByVal 0&) If (ret = 0) Then Debug.Print ("Done [OK].") ElseIf (ret = PAGEMASTER_ERR_DIRCREATE) Then Debug.Print ("ERROR: Creating the output file/directory.") ElseIf (ret = PAGEMASTER_ERR_BADFILENAME) Then Debug.Print ("ERROR: Bad input filename or path.") ElseIf (ret = PAGEMASTER_ERR_NOOUTFILE) Then Debug.Print ("ERROR: Output file not specified.") ElseIf (ret = PAGEMASTER_ERR_NOINPUTFILES) Then Debug.Print ("ERROR: No input files found.") Else Debug.Print ("ERROR: Other error.") End If End Sub