Results 1 to 4 of 4
  1. #1
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171

    Printing a pdf image displayed in a form


    On a form I have a box created from the active x control 'Adobe pdf Reader'. It very nicely displays the pdf image. Printing the form with the DoCmd.Printout prints the form data but not the image. Question is how can I print the form data and the image together. Almost like a screen print.

  2. #2
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    You could try dumping this into a standard module. Written for Word, but apparently works in Access as well.
    Code:
    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
      bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    
    Private Const KEYEVENTF_KEYUP = &H2
    Private Const VK_SNAPSHOT = &H2C
    Private Const VK_MENU = &H12
    
    Sub AltPrintScreen()
        keybd_event VK_MENU, 0, 0, 0
        keybd_event VK_SNAPSHOT, 0, 0, 0
        keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
        keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
    End Sub
    
    
    Found it here http://word.mvps.org/faqs/macrosvba/PrtSc.htm
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171
    Does this module require a specific name or can it be named anything?
    What would be the syntax of the call statement in the event procedure?

  4. #4
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    You can name the module whatever you want. I put reusable stuff in modules with descriprive names. Maybe mdlCommonFunctions? The call would be altPrintScreen, the name of the sub that uses the decared sub.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-13-2015, 12:07 PM
  2. Replies: 9
    Last Post: 04-21-2013, 05:37 PM
  3. Replies: 1
    Last Post: 12-19-2012, 05:34 PM
  4. Replies: 1
    Last Post: 12-05-2010, 02:34 AM
  5. Printing form: image fails to update
    By stellar0645 in forum Forms
    Replies: 6
    Last Post: 02-04-2010, 11:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums