Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Print pdf´s using acrobat

Print pdf´s using acrobat

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Knoen
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • K Knoen

      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

      J Offline
      J Offline
      Jeremy Falcon
      wrote on last edited by
      #2

      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

      K 1 Reply Last reply
      0
      • J 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

        K Offline
        K Offline
        Knoen
        wrote on last edited by
        #3

        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")

        J 1 Reply Last reply
        0
        • K Knoen

          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")

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups