By Barbara Han
To set a sheet to a specific width and height, directly writing the width and height property of the sheet will not work if you don’t specify the size property kCustomDrawingSheetSize from DrawingSheetSizeEnum in advance.
Here is a VB.NET sample code demonstrating how to do that:
Sub setSheetSize()
Dim st As Sheet
Dim dw As DrawingDocument
dw = Thisapplication.ActiveDocument
st = dw.ActiveSheet
Dim w As Double
w = st.Width / 2
Dim h As Double
h = st.Height / 2
st.Size = DrawingSheetSizeEnum.kCustomDrawingSheetSize
st.Height = h
st.Width = w
End Sub