如果 Microsoft Excel 按照键入的内容自动设置超链接的格式,则该值为 True(默认)。如果 Excel 不按照键入的内容自动设置超链接的格式,则该值为 False。Boolean 类型,可读写。
expression.AutoFormatAsYouTypeReplaceHyperlinks
expression 必需。该表达式返回“应用于”列表中的对象之一。
在本示例中,Microsoft Excel 判断是否可按照键入的内容自动设置超链接的格式,并通知用户。
Sub CheckHyperlinks()
' Determine if automatic formatting is enabled and notify user.
If Application.AutoFormatAsYouTypeReplaceHyperlinks = True Then
MsgBox "Automatic formatting for typing in hyperlinks is enabled."
Else
MsgBox "Automatic formatting for typing in hyperlinks is not enabled."
End If
End Sub