A
Aaron Babel
The following code finds a date field in the
active document and unlinks it, to leave
the current year as text:
...
Selection.GoTo What:=wdGoToField, Name:="Date"
Selection.Fields.Unlink
...
Additionally, the same date field appears in the footer of
the last page of the active document. I wrote this
code to find and unlink it:
...
Selection.GoTo What:=wdGoToPage, Which:=wdGoToLast
With ActiveDocument.ActiveWindow.View
.Type = wdPrintView
.SeekView = wdSeekCurrentPageFooter
End With
Selection.GoTo What:=wdGoToField, Name:="Date"
Selection.Fields.Unlink
However, it doesn't select the fields, and, consequently,
it doesn't unlink it. What am I missing? Or is this simply
not possible?
I hope I've been clear. Thanks for your consideration.
Aaron
active document and unlinks it, to leave
the current year as text:
...
Selection.GoTo What:=wdGoToField, Name:="Date"
Selection.Fields.Unlink
...
Additionally, the same date field appears in the footer of
the last page of the active document. I wrote this
code to find and unlink it:
...
Selection.GoTo What:=wdGoToPage, Which:=wdGoToLast
With ActiveDocument.ActiveWindow.View
.Type = wdPrintView
.SeekView = wdSeekCurrentPageFooter
End With
Selection.GoTo What:=wdGoToField, Name:="Date"
Selection.Fields.Unlink
However, it doesn't select the fields, and, consequently,
it doesn't unlink it. What am I missing? Or is this simply
not possible?
I hope I've been clear. Thanks for your consideration.
Aaron