Convert ancient WordBasic statement to VBA

R

Rick

I just inherited a very old macro that was written in WordBasic. It
contains this command:

WordBasic.NormalViewHeaderArea Type:=0, FirstPage:=1,
OddAndEvenPages:=0, HeaderDistance:= "0.5" + Chr(34),
FooterDistance:="0.5" + Chr(34)

Can someone help me figure out the counterpart for this in VBA?
Thanks much.
 
D

DaveLett

Hi Rick,
Pretty sure that it's something like the following:

ActiveDocument.ActiveWindow.View.SeekView = wdSeekCurrentPageHeader

HTH,
Dave
 
J

Jay Freedman

Actually, it's a combination of opening the page header and setting its
properties. There's no single VBA statement that does it all.

You can download the Word 95 WordBasic help from
http://www.microsoft.com/downloads/details.aspx?familyid=1a24b2a7-31ae-4b7c-a377-45a8e2c70ab2
and look up NormalViewHeaderArea to read all the details. The introduction
to the topic says:

"Opens the header/footer pane (normal and outline views) or displays the
header or footer area (page layout view) and sets options for headers and
footers. Word version 6.0 preserves the ability to display the header/footer
pane so you can edit any type of header or footer, regardless of the number
of pages in a document, and so the spelling checker can highlight misspelled
words in a header or footer.

"The arguments for the NormalViewHeaderArea statement correspond to the
options in the Header/Footer dialog box in Word version 2.x. Note that these
options are usually set using FilePageSetup in Word version 6.0. Although
you can retrieve information from the NormalViewHeaderArea dialog record,
you cannot use this statement to display the Word version 2.x dialog box."

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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