Dear,
I am hoping that you guys can help me with the following: I borrowed an excel macro which makes it possible to navigate in a word file. But i would like to also navigate in the header/footer of a Microsoft word file.
The code I am borrowing to navigate in the word file is:
I hope you can guys can help me.
Greetings Baran
I am hoping that you guys can help me with the following: I borrowed an excel macro which makes it possible to navigate in a word file. But i would like to also navigate in the header/footer of a Microsoft word file.
The code I am borrowing to navigate in the word file is:
Code:
Sub EditwordFile()
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Open("FILENAME")
wrdApp.Visible = True
With wrdDoc
.Application.Selection.Find.Text = "aanvraagbrief"
.Application.Selection.Find.Execute
'now found, lets insert text after
.Application.Selection.InsertBefore "hello there!"
End With
wrdApp.Quit ' close the Word application
Set wrdDoc = Nothing
Set wrdApp = Nothing
End Sub
I hope you can guys can help me.
Greetings Baran
Last edited by a moderator: