|Post date: 2007-10-11 16:43|
I have an agent that acts on selected documents in a view (got this
from a colleague who found it in some forum).
For each document it shall print the document and its attachments. The agent works fine if the attachments are of type word (.doc). I would like it to work for pdf, txt, rtf and possible other formats as well. However I can't get a grip on the OLE classes.
I try to use them as they are stated in Domino Designer (I have looked in the windows registry as well) and it only generates the error "Cannot create automation object" whenever I use the CreateObject method. No such error is raised when I am creating an object for the OLE class "Word.Application". "Excel.Application" also works fine.
I have tried several different suggestions that I've found on developerworks and here is the latest try. I also tried the OLE class "AcroExch.Document" which is commonly suggested in the forums. When I try to use "AcroPDF.PDF" Notes crashes/dies.
The attached file contains the agent content. The problem occurs on the first line in "case pdf:", that is when the "CreateObject" is called.
There should be some logic in this and I'm sure there this. Can someone explain it to me. Any suggestion and help is appreciated!
Kind regards / Niklas