Imprimir o Guardar un Frame dentro de un Form
Un gusto saludarles nuevamente vengo con un tema que no he podido resolver aun. Tengo un formulario en donde tengo varios datos dentro de un frame lo que deseo hacer es poder imprimir el frame con su contenido pero solo he podio imprimir el form cosa que no deseo ya que solo me interesa los datos dentro de frame tanto como mandarlo a impresora como guardar en PDF.
Les dejo una imagen los datos que he venido usando, gracias por su ayuda.

#If VBA7 And Win64 Then
Private Declare PtrSafe Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
#Else
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
#End If
Const KEYEVENTF_EXTENDEDKEY = &H1
Const KEYEVENTF_KEYUP = &H2
Const VK_SNAPSHOT = &H2C
Const VK_MENU = &H12
Private Sub PDF_Click()
Dim Ruta As String
keybd_event VK_MENU, 0, KEYEVENTF_EXTENDEDKEY, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0
keybd_event VK_MENU, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0
DoEvents
ThisWorkbook.Worksheets.Add After:=Worksheets(Worksheets.Count)
Range("A1").Select
ActiveSheet.Paste
Let Ruta = ActiveWorkbook.Path & "\" & "Frame1.pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Ruta, _
Quality:=xlQualityStandard, IncludeDocProperties:=False, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Application.DisplayAlerts = False
Worksheets(Worksheets.Count).Delete
Application.DisplayAlerts = True
End Sub
Private Sub IMPRIMIR_Click()
imprimir.PrintForm
End Sub
1 Respuesta
Respuesta de Abraham Valencia
1
