Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VBA: Word 2010 - Close Header & Footer Tools with VBA

Tags:

ms-word

vba

I'm using a macro, which inserts a text into the footer. After the macro has finished, the Header & Footer Tools are active, so I'm in the editing mode for the footer. Does anyone know how to close this editmode with VBA?

Thanks

like image 857
Torben Avatar asked Aug 25 '10 14:08

Torben


1 Answers

In Word 2007

    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

I don't have W 2010 at hand to test. If it doesn't work, please post a comment and I'll delete the answer.

HTH

like image 73
Dr. belisarius Avatar answered Oct 23 '22 04:10

Dr. belisarius