该属性返回或设置默认信封尺寸。String 类型,可读写。
注意 返回的字符串与“信封选项”对话框中“信封尺寸”框右边的字符串一致。如果选择 DefaultHeight 或 DefaultWidth 属性,则“工具”菜单的“信封选项”对话框中的信封尺寸将自动改为“自定义尺寸”,并且该属性返回“自定义尺寸”。
本示例将默认信封尺寸设为 C4(229 x 324 毫米)。
ActiveDocument.Envelope.DefaultSize = "C4"
本示例提示用户是否将默认信封尺寸设为“Size 10”。如果回答为“是”,则默认尺寸将进行相应的更改。UpdateDocument 方法会更改活动文档的信封尺寸。如果活动文档中没有添加此信封,则会显示一个消息框。
Sub exDefaultSize()
Dim intResponse As Integer
On Error GoTo errhandler
intResponse = MsgBox("Do you want to set the " _
& "default envelope to Size 10?", 4)
If intResponse = vbYes Then
With ActiveDocument.Envelope
.DefaultSize = "Size 10"
.UpdateDocument
End With
End If
Exit Sub
errhandler:
If Err = 5852 Then _
MsgBox "An envelope isn't part of this document"
End Sub