mmtraining
IS-IT--Management
Hi, All,
I need to search through a document including the headers for fields whose names have been changed for some reason (up until the changeover fom Office 97 to Office XP the fields were called Titel1, Titel2 and Titel3 and are now Title1, Title2 and Title3)
I have got this far:
This deals nicely with the main document, now I need to hop into the headers (there is one or more) and deal with the fields up there. Any ideas?
Should anyone have an idea how to do the whole thing more elegantly, please tell me how. I have the sneaking feeling I could replace the fields Title1, Title3, Title3, with the "real" ones.
Thanx a lot in advance,
Carol, Berlin
I need to search through a document including the headers for fields whose names have been changed for some reason (up until the changeover fom Office 97 to Office XP the fields were called Titel1, Titel2 and Titel3 and are now Title1, Title2 and Title3)
I have got this far:
Code:
Sub Felder_korrigieren()
Dim oFeld As Field
ActiveWindow.View.ShowFieldCodes = True
For Each oFeld In ActiveDocument.Fields
oFeld.Select
Selection.Find.Execute FindText:="Title", ReplaceWith:="Titel", _
Replace:=wdReplaceOne
Next oFeld
Selection.WholeStory
Selection.Fields.Update
ActiveWindow.View.ShowFieldCodes = False
End Sub
This deals nicely with the main document, now I need to hop into the headers (there is one or more) and deal with the fields up there. Any ideas?
Should anyone have an idea how to do the whole thing more elegantly, please tell me how. I have the sneaking feeling I could replace the fields Title1, Title3, Title3, with the "real" ones.
Thanx a lot in advance,
Carol, Berlin