selecting range of primary header story type in code.

R

rob

writing this vba application , I get the following error message
"command only
available in print view mode"
I set the activewindow view mode in code by
"ActiveDocument.ActiveWindow.View.Type = wdPrintView"

and then do "activedocument.bookmarks.item(index).select". I still get
the error

now check this out if I go to word window toolbar and change the view
mode to
print layout view the code progresses fine.
Note that i checked the view mode in code after changing the view from
inside
word and it outputs wdprintview.

is there anyway to get arround this problem.
let me know if you need anymore information

ta
Rob
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Rob,

ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range

creates a reference to the range of the Primary Header in the first section
of the active document,

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

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