Hello All,
I am trying to print a user form to PDF. Thus far I have found it works best to create a bitmap file of the userform. Please see programming below...
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Const VK_SNAPSHOT = &H2C
keybd_event VK_SNAPSHOT, 1, 0, 0
Workbooks.Add 1
ActiveSheet.Range("A1").Select
Application.Wait Now + TimeValue("00:00:01")
ActiveSheet.PasteSpecial Format:="Bitmap", Link:=False, DisplayAsIcon:=False
With ActiveSheet
.PageSetup.Orientation = xlPortrait
.PageSetup.Zoom = 76
.PrintOut
End With
ActiveWorkbook.Close False
Unload Me
This is working our great and allowing me to print to PDF... BUT, when I run this, the bitmap file has my toolbar at the bottom.
How can I adjust this so that my tool bar is no longer at the bottom of the image?
I am trying to print a user form to PDF. Thus far I have found it works best to create a bitmap file of the userform. Please see programming below...
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Const VK_SNAPSHOT = &H2C
keybd_event VK_SNAPSHOT, 1, 0, 0
Workbooks.Add 1
ActiveSheet.Range("A1").Select
Application.Wait Now + TimeValue("00:00:01")
ActiveSheet.PasteSpecial Format:="Bitmap", Link:=False, DisplayAsIcon:=False
With ActiveSheet
.PageSetup.Orientation = xlPortrait
.PageSetup.Zoom = 76
.PrintOut
End With
ActiveWorkbook.Close False
Unload Me
This is working our great and allowing me to print to PDF... BUT, when I run this, the bitmap file has my toolbar at the bottom.
How can I adjust this so that my tool bar is no longer at the bottom of the image?