Sub PlotNormal() On Error Resume Next Dim sheetSize, sheetOrientation, PCName As String Dim oPrintMgr As DrawingPrintManager PCName = GetComputerInfo 'MsgBox PCName Set oPrintMgr = ThisApplication.ActiveDocument.PrintManager sheetSize = GetBlattgroesse 'MsgBox sheetSize sheetOrientation = GetBlattausrichtung If PCName = "CAD1" Or PCName = "CAD16" Or PCName = "CAD20" Or PCName = "CAD21" Then Select Case sheetSize Case "A0": oPrintMgr.Printer = "Oce 9400 (A0)": Format1 = "A0": Format2 = "Querformat" Case "A1": oPrintMgr.Printer = "Oce 9400 (A1)": Format1 = "A1": Format2 = "Querformat" Case "A2": oPrintMgr.Printer = "Oce 9400 (A2)": Format1 = "A2": Format2 = "Querformat" Case "A3": oPrintMgr.Printer = "HP LaserJet 4MV (A3)": Format1 = "A3": Format2 = "Querformat" Case "A4": If sheetOrientation = "Q" Then oPrintMgr.Printer = "HP LaserJet 4MV (A4Q)": Format1 = "A4": Format2 = "Querformat" Else oPrintMgr.Printer = "HP LaserJet 4MV": Format1 = "A4": Format2 = "Hochformat" End If End Select Else Select Case sheetSize Case "A0": oPrintMgr.Printer = "Oce 9400 (A0)": Format1 = "A0": Format2 = "Querformat" Case "A1": oPrintMgr.Printer = "Oce 9400 (A1)": Format1 = "A1": Format2 = "Querformat" Case "A2": oPrintMgr.Printer = "Oce 9400 (A2)": Format1 = "A2": Format2 = "Querformat" Case "A3": oPrintMgr.Printer = "HP LaserJet 5Si (A3)": Format1 = "A3": Format2 = "Querformat" Case "A4": If sheetOrientation = "Q" Then oPrintMgr.Printer = "HP LaserJet 5Si (A4Q)": Format1 = "A4": Format2 = "Querformat" Else oPrintMgr.Printer = "HP LaserJet 5Si": Format1 = "A4": Format2 = "Hochformat" End If End Select End If sPrinterName = oPrintMgr.Printer oPrintMgr.NumberOfCopies = 1 oPrintMgr.ScaleMode = kPrintFullScale oPrintMgr.ColorMode = kPrintGrayScale oPrintMgr.SubmitPrint End Sub Public Function GetBlattgroesse() As String Dim sheetSize As String Dim oDrawDoc As DrawingDocument Set oDrawDoc = ThisApplication.ActiveDocument If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then Dim oSheet As sheet Set oSheet = oDrawDoc.ActiveSheet Select Case oSheet.Size Case 9997 sheetSize = "A4" Case 9996 sheetSize = "A3" Case 9995 sheetSize = "A2" Case 9994 sheetSize = "A1" Case 9993 sheetSize = "A0" Case Else sheetSize = "unbekanntes Format" End Select 'MsgBox sheetSize End If GetBlattgroesse = sheetSize End Function Public Function GetBlattausrichtung() As String Dim sheetOrientation As String Dim oDrawDoc As DrawingDocument Set oDrawDoc = ThisApplication.ActiveDocument If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then Dim oSheet As sheet Set oSheet = oDrawDoc.ActiveSheet Select Case oSheet.Orientation Case 10242 sheetOrientation = "Q" Case Else sheetOrientation = "H" End Select 'MsgBox sheetOrientation End If GetBlattausrichtung = sheetOrientation End Function Public Function GetComputerInfo() As String Dim Result As Long Dim cInfo As String cInfo = Space$(256) Result = GetComputerName(cInfo, Len(cInfo)) If InStr(cInfo, Chr$(0)) > 0 Then cInfo = Left$(cInfo, InStr(cInfo, Chr$(0)) - 1) GetComputerInfo = cInfo End Function