INITIALIZE cannot create automation object

I need to generate pdfs from lotus notes documents and store it in shared folder. I have downloaded pdfcreator2.1.2 and I’m getting error ‘INITIALIZE cannot create automation object’ at line ‘Set PDFCreator = CreateObject(“PDFCreator.clsPDFCreator”)’ … quick help on this will be really appreciate. If there is any other way, please mail me at t.raviachari@gmail.com. Thank you----------------

On Error GoTo ErrorHandler

Dim docSelected As NotesDocument

Dim uiWS As NotesUIWorkspace

Dim uiDocCurrent As NotesUIDocument

Dim sPDFPath As String

Dim PDFCreator As Variant

Set uiWS = New NotesUIWorkspace

Set docSelected = doc

Set uiDocCurrent = uiWS.Editdocument(False, docSelected)

Dim rti As NotesRichTextItem

Set rti = docSelected.GetFirstItem(“Body”)

Dim rtnav As NotesRichTextNavigator

Set rtnav = rti.CreateNavigator

If rtnav.FindFirstElement(RTELEM_TYPE_SECTION) Then

Call uiDocCurrent.Expandallsections()

End If

Set PDFCreator = CreateObject(“PDFCreator.clsPDFCreator”)

If Not PDFCreator.cStart(“”,True) Then

MsgBox “PDFCreator printer is not installed”,16,“PDFCreator”

Exit Sub

End If

sPDFPath = CStr(strTargetFolder) & ""

With PDFCreator

.cOption(“UseAutosave”) = 1

.cOption(“UseAutosaveDirectory”) = 1

.cOption(“AutosaveDirectory”) = sPDFPath

.cOption(“AutosaveFilename”) = “Test.pdf”

.cOption(“AutosaveFormat”) = 0

.cOption(“OptionsVisible”) = 0

.cOption(“PDFOptimize”) = 1

.cClearCache

End With

Call uiDocCurrent.Print(1,“PDFCreator”)

Call uiDocCurrent.Close(True)

PDFCreator.cClose

Set PDFCreator = Nothing

Exit Sub

ErrorHandler:

If Not PDFCreator Is Nothing Then

PDFCreator.cClose

Set PDFCreator = Nothing

End If

MsgBox "Error at line # " & Erl & " - " & Error & Chr(13) & “In ExportToPDF”

Exit Sub

Subject: I found the issue

http://docs.pdfforge.org/pdfcreator/2.3/en/pdfcreator/com-interface/user-manual/basics/workflow-comparsion-v1-7-v2/

The old COM Interface (v1.7.*) consisted of three different objects: the clsPDFCreator object, the clsPDFCreatorOptions and the clsPDFCreatorError. The first object leads the main conversion process, e.g. it starts the actual conversion on a file, sets the printer, sets the options and so on. Whereas the second one just sets the different settings options that PDFCreator offers to its users. The third object is just for success/failure report.

In opposite to that, the new COM Interface (v2.*) has five different objects: the Queue object, the PrintJob object, the PDFCreatorObj object, the Printers object, the OutputFiles object. We will only focus on the first three since they define the main workflow. The Queue object acts as a container for all jobs that should be converted and you have full control over that container using the Queue object. Each of these jobs is in turn wrapped into the PrintJob object, which allows you to set up specific settings for different jobs such as under which conversion profile each job should be converted. The PDFCreatorObj object allows to retrieve information about the current instance of PDFCreator, i.e. if it is running or not, but also to print files.