Message 1 of 3
change paper size name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am writing a code. And so far everything works besides when you chose: "A0 Custom". That in the drawing paper size it says: "Custom Size (mm)"
Is it possible that it will say: "A0xl"
Sub Main()
Dim oSheetFormat As New ArrayList
oSheetFormat.Add("A0 Custom")
oSheetFormat.Add("A0 Liggend")
oSheetFormat.Add("A0 Staand")
oSheetFormat.Add("A1 Liggend")
oSheetFormat.Add("A1 Staand")
oSheetFormat.Add("A2 Liggend")
oSheetFormat.Add("A2 Staand")
oSheetFormat.Add("A3 Liggend")
oSheetFormat.Add("A3 Staand")
oSheetFormat.Add("A4 Liggend")
oSheetFormat.Add("A4 Staand")
oSheetFormatIP = InputListBox("Sheet Format", oSheetFormat, oSheetFormat(0))
If oSheetFormatIP = oSheetFormat(0) Then Sheet_A0Xl_Custom(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(1) Then Sheet_A0_Liggend(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(2) Then Sheet_A0_Staand(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(3) Then Sheet_A1_Liggend(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(4) Then Sheet_A1_Staand(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(5) Then Sheet_A2_Liggend(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(6) Then Sheet_A2_Staand(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(7) Then Sheet_A3_Liggend(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(8) Then Sheet_A3_Staand(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(9) Then Sheet_A4_Liggend(oSheetFormatIP)
If oSheetFormatIP = oSheetFormat(10) Then Sheet_A4_Staand(oSheetFormatIP)
End Sub
Sub Sheet_A0Xl_Custom(x)
Lengte = InputBox("Lengte", "Lengte", "Default Entry")
ActiveSheet.ChangeSize(1188, Lengte, moveBorderItems :=True)
End Sub
Sub Sheet_A0_Liggend(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kLandscapePageOrientation
ActiveSheet.ChangeSize("A0", moveBorderItems :=True)
End Sub
Sub Sheet_A0_Staand(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kPortraitPageOrientation
ActiveSheet.ChangeSize("A0", moveBorderItems :=True)
End Sub
Sub Sheet_A1_Liggend(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kLandscapePageOrientation
ActiveSheet.ChangeSize("A1", moveBorderItems :=True)
End Sub
Sub Sheet_A1_Staand(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kPortraitPageOrientation
ActiveSheet.ChangeSize("A1", moveBorderItems :=True)
End Sub
Sub Sheet_A2_Liggend(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kLandscapePageOrientation
ActiveSheet.ChangeSize("A2", moveBorderItems :=True)
End Sub
Sub Sheet_A2_Staand(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kPortraitPageOrientation
ActiveSheet.ChangeSize("A2", moveBorderItems :=True)
End Sub
Sub Sheet_A3_Liggend(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kLandscapePageOrientation
ActiveSheet.ChangeSize("A3", moveBorderItems :=True)
End Sub
Sub Sheet_A3_Staand(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kPortraitPageOrientation
ActiveSheet.ChangeSize("A0", moveBorderItems :=True)
End Sub
Sub Sheet_A4_Liggend(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kLandscapePageOrientation
ActiveSheet.ChangeSize("A4", moveBorderItems :=True)
End Sub
Sub Sheet_A4_Staand(x)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = Inventor.PageOrientationTypeEnum.kPortraitPageOrientation
ActiveSheet.ChangeSize("A4", moveBorderItems :=True)
End Sub