Prueba esto a ver si es lo que necesitas:´ En un módulo Public Const PHYSICALOFFSETX As Long = 112 Public Const PHYSICALOFFSETY As Long = 113Public Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long ´ En el procedimiento de impresión Printer.ScaleMode = vbTwips ´ Obtiene el margen izquierdo no imprimible en twips LeftOffset = Printer.ScaleX(GetDeviceCaps(Printer.hdc, PHYSICALOFFSETX), vbPixels, vbTwips) ´ Obtiene el margen superior no imprimible en twips TopOffset = Printer.ScaleY(GetDeviceCaps(Printer.hdc,PHYSICALOFFSETY), vbPixels, vbTwips)
|