PDF to Notes & Notes to PDF ( part 3 )

Last PDF to Notes & Notes to PDF article, we talk about Forms and what they do.

Here we will talk about what is needed to be done in the application you are going to enable your user to create from PDFs from.

This small amount of LS code that goes into the calling document

The parts of the code that is in BOLD is all that you will need to change.

It that simple!

Sub Click(Source As Button)
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Dim pdfDB As NotesDatabase
Dim agent As NotesAgent
Dim strGetNotesVersion As String
Dim strParseNotesVersion As String

Set db = s.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document

StrGetNotesVersion = s.NotesVersion
StrParseNotesVersion = Replace(Replace(Replace(Left$(strGetNotesVersion, 9), “Release “, “”), “Build V”, “”), “5”, “”)

‘Variable list
StrGetProfileName = “PDF_Demo”
StrGetCallingKey = doc.customercode(0)

‘Location of Notes to PDF DB
StrGetPDFDB = “pdfToNotes40D.nsf

StrGetThisDB = db.filepath
StrGetServer = db.Server

‘Do not edit below this line
‘Set Environment Var of the Calling Document
Call s.SetEnvironmentVar( “PDFCurrentServer”, strGetServer, False)
Call s.SetEnvironmentVar( “PDFCurrentDB”, strGetThisDB, False)
Call s.SetEnvironmentVar( “PDFCurrentProfileName”, strGetProfileName, False)
Call s.SetEnvironmentVar( “PDFCallingKey”, strGetCallingKey, False)

‘Call agent
Set pdfDB = s.GetDatabase(strGetServer, strGetPDFDB)
Set agent = pdfDB.GetAgent(“createPDFMainR” + strParseNotesVersion)

If (agent.Run(doc.NoteID) = 0) Then
Print “Agent Ran”
Print “Agent Failed”
End If
End Sub

But this is not a simple application by any means, its very powerful.

Not to mention that it also take PDF data to Notes documents, now that is VERY powerful feature.

For example lets say your company has PDF document ready to be download and its has edible fields.

The user will fill it in and when ready to send the data back to Lotus Notes, the user will click on a HTTP Submit Button. The HTTP Submit Button sends the PDF data to PIN and pin translates the data to the Lotus Notes forms of your choice (this is based on a PIN Profile).

That not just saves time but eliminates human error of retyping this in

Those who requested a demo, zip file is going out monday. have a great weekend


One thought on “PDF to Notes & Notes to PDF ( part 3 )

  1. Hi

    excellent article.

    Could you please be so kind and send me your demo db, too.

    Andy K.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s