Print pdf´s using acrobat
-
Im trying to automat Acrobat Reader. I want to print pdf-files. I added a reference to AcroPDFLib and typed the following: Dim a As AcroPDFLib.AcroPDFClass a = CreateObject("AcroPDF.PDF.1") a.LoadFile("atmel_instruction_set.pdf") Now, the object creates itself ok (i think) at least when i check the windows task manager the AcroRd32.exe is running. But when the last line executes i get "Object reference not set to an instance of an object" What am i doing wrong? Thanks in advance
-
Im trying to automat Acrobat Reader. I want to print pdf-files. I added a reference to AcroPDFLib and typed the following: Dim a As AcroPDFLib.AcroPDFClass a = CreateObject("AcroPDF.PDF.1") a.LoadFile("atmel_instruction_set.pdf") Now, the object creates itself ok (i think) at least when i check the windows task manager the AcroRd32.exe is running. But when the last line executes i get "Object reference not set to an instance of an object" What am i doing wrong? Thanks in advance
Knoen wrote:
What am i doing wrong?
You need to assign it using the
Set
keyword. Try this instead...Dim a As AcroPDFLib.AcroPDFClass
Set a = CreateObject("AcroPDF.PDF.1")
a.LoadFile("atmel_instruction_set.pdf")Jeremy Falcon
-
Knoen wrote:
What am i doing wrong?
You need to assign it using the
Set
keyword. Try this instead...Dim a As AcroPDFLib.AcroPDFClass
Set a = CreateObject("AcroPDF.PDF.1")
a.LoadFile("atmel_instruction_set.pdf")Jeremy Falcon
Hi, still does not work. If i use the set keyword it just goes away when i change the row with the marker.
Jeremy Falcon wrote:
You need to assign it using the Set keyword. Try this instead... Dim a As AcroPDFLib.AcroPDFClassSet a = CreateObject("AcroPDF.PDF.1")a.LoadFile("atmel_instruction_set.pdf")
-
Hi, still does not work. If i use the set keyword it just goes away when i change the row with the marker.
Jeremy Falcon wrote:
You need to assign it using the Set keyword. Try this instead... Dim a As AcroPDFLib.AcroPDFClassSet a = CreateObject("AcroPDF.PDF.1")a.LoadFile("atmel_instruction_set.pdf")
Knoen wrote:
Hi, still does not work.
Then double check the name of your object used in CreateObject. Is that control installed on the system? Jeremy Falcon