Word) (Range.Fields 屬性

會傳回代表指定範圍中所有欄位的 Fields 集合。 唯讀。

語法

expression. Fields

需要 expression。 代表 Range 物件的變數。

範例

此範例會移除使用中文件裡,主要文字本文及頁尾中的所有欄位。

For Each aField in ActiveDocument.Fields 
 aField.Delete 
Next aField 
Set myRange = ActiveDocument.Sections(1).Footers _ 
 (wdHeaderFooterPrimary).Range 
For Each aField In myRange.Fields 
 aField.Delete 
Next aField

另請參閱

Range 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應