1
문서의 모든 필드를 업데이트하는 절차가 있습니다. 그러나 wdFieldDocVariable을 건너 뛰고 싶습니다. 항목 인덱스는 Type이어야합니다. 내가 생각Word 문서 필드 업데이트
Public Sub MyApplicationUpdate()
hdWriteInfoLog ("BEGIN MACRO: MyApplicationUpdate")
Dim oTOC As TableOfContents
Dim oField As Field
' Update Fields in all document StoryRanges
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
' Update all TablesOfContents
For Each oTOC In ActiveDocument.TablesOfContents
oTOC.Update
Next oTOC
hdWriteInfoLog ("END MACRO: MyApplicationUpdate")
End Sub
'OStory'에서'wdFieldDocVariable'의 아이템 인덱스는 무엇입니까? –
나는 그것이 "oStory.Type = wdFieldDocVariable이 아닌 경우"와 같은 것이어야한다고 생각합니다. " –
'wdFieldDocVariable'이란 무엇입니까? 그것에 할당 된 것은 무엇입니까? –