G
gattsi
Hi,
I've seen a few posts out there that attempt to deal with accessing
fields within headers/footers but I've not been able to implement any
of the ideas succesfully using Word 2003 (SP2).
I need to access each field (contained in a textbox) within a
header/footer and use its code property (fld.code). Has anyone been
able to do this?
Thanks
For Each rngStory In ActiveDocument.StoryRanges
Do
If rngStory.ShapeRange.Count > 0 Then
For Each oShp In rngStory.ShapeRange
oShp.Select 'This throws a "member cannot be accessed
in this view" error!!
For Each fld In Selection
MsgBox fld.Code
Next
Next
End If
Set rngStory = rngStory.NextStoryRange
Loop Until rngStory Is Nothing
Next
I've seen a few posts out there that attempt to deal with accessing
fields within headers/footers but I've not been able to implement any
of the ideas succesfully using Word 2003 (SP2).
I need to access each field (contained in a textbox) within a
header/footer and use its code property (fld.code). Has anyone been
able to do this?
Thanks
For Each rngStory In ActiveDocument.StoryRanges
Do
If rngStory.ShapeRange.Count > 0 Then
For Each oShp In rngStory.ShapeRange
oShp.Select 'This throws a "member cannot be accessed
in this view" error!!
For Each fld In Selection
MsgBox fld.Code
Next
Next
End If
Set rngStory = rngStory.NextStoryRange
Loop Until rngStory Is Nothing
Next