Remove focus from header

G

Graham Mayor

ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
H

hals_left

Hi I have the following code that is run after prodcuing a dynamic
document.
After running this, the documment is left with the cursor in the header
.. Is there a simple command I can add to just put the focus back into
the main document - anywhere will do!.

Thanks in advance.
hals_left

Sub addHeader(strText)
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
Selection.TypeText Text:= strText & " Page: "
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _
"PAGE \* Arabic ", PreserveFormatting:=True
Selection.TypeText Text:=" of "
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _
"NUMPAGES \* Arabic ", PreserveFormatting:=True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top