返回的 字符串 ,该值代表当页面视图设置为显示域代码时显示的文本。 此为只读属性。
语法
表达式。代码
表达式 表示 Field 对象的变量。
返回值
字符串
示例
此示例循环访问活动发布中的所有字段,然后显示一条消息,说明是否在任何字段的代码中找到了字符串 "www" 。
Sub FindWWWHyperlinks()
Dim intItem As Integer
Dim intField As Integer
With ActiveDocument.Pages(1).Shapes(1).TextFrame.TextRange.Fields
Do
intItem = intItem + 1
If InStr(1, .Item(intItem).Code, "www") > 0 Then
intField = intField + 1
End If
Loop Until intItem = .Count
End With
If intField > 0 Then
MsgBox "You have " & intField & " World Wide Web " & _
"hyperlinks in your publication."
Else
MsgBox "You have no hyperlink fields in your publication."
End If
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。