Need help or advice?

Call us on
+44 (0) 2077 545 948

PDF Notes

Notes To PDF

Quickly and easily convert Notes to PDF. With only 2 lines of code any Notes / Domino content can be saved as PDF.

Download Now
LotusScript FileExists Function

The DominoPDF DoPDF() method returns 0 (zero) for a successful operation and -1 for an unsuccesful operation.

So you can take the return value and test against this, for example;

iRet = DoPDF(sURL, sPDF, sOptions)
if iRet = -1 then Error = True

You can also use the LotusScript Dir$ function to check that the PDF has actually been created on disk and if not take appropriate action.

To make it even easier below is a FileExists() LotusScript method which you can use.

Function FileExists(sFileName As String) As Integer
'Declare variables..
Dim iPos As Integer, iPrevPos As Integer
Dim sFile As String

'Validate passed filename...
iPos = 0
Do
iPrevPos = iPos
iPos = Instr(iPos + 1, sFileName, "\")
Loop Until iPos = 0
iPos = iPrevPos

sFile = Right$(sFileName, Len(sFileName) - iPos)

'Check to see if file exists and return results...
If Dir$(sFileName) = sFile Then
FileExists = True
Else
FileExists = False
End If
End Function

Comments (0)add
Write comment
smaller | bigger

busy
 

In the Spotlight

Quick And Easy Notes To PDF Conversion


+ Read More

PDF Forms For Lotus Domino: Compendia Implements DominoPDF

Compendia, a Primeapple partner in Norway, has implemented a stock / fund trading application using DominoPDF for FMG, a multi-manager fund company.
+ Read More

Lotus Notes Attachments To PDF

IBM Notes / Domino is an ideal platform for managing and storing a wide range of rich content, files, objects and attachments.
+ Read More

News Feed

Subscribe to the Primeapple RSS News Feed.