Word Automation. To fix the text always at the top of page

N

Nazim

I am working on word automation. I found a control on net which gives you to
edit a word document with programming. Problem is There are 5 headings in my
document. And i have to paste paragrahph under the headings using vb.net.
Things are working fine. But one of my heading text i.e. Recommendation
should always stand at the top of the page regardliess of how many paragrapsh
are entered.

For example.

Protection:

Income:

Retirement:

Recommendation.:

Note: recommendation heading text is on the new page.

These are the headings text. If I enter paragraphs under protection heading
text. It will ovbvioously scroll down and move other contents level below
depending upon the text. Supoose if i am entering paragraphs and about to
reach at the recommendation section, it should shift recommendation heading
to the next page at the top. In this way This heading will always stay at
top. Kindly help
 
J

Jonathan West

Nazim said:
I am working on word automation. I found a control on net which gives you
to
edit a word document with programming. Problem is There are 5 headings in
my
document. And i have to paste paragrahph under the headings using vb.net.
Things are working fine. But one of my heading text i.e. Recommendation
should always stand at the top of the page regardliess of how many
paragrapsh
are entered.

For example.

Protection:

Income:

Retirement:

Recommendation.:

Note: recommendation heading text is on the new page.

These are the headings text. If I enter paragraphs under protection
heading
text. It will ovbvioously scroll down and move other contents level below
depending upon the text. Supoose if i am entering paragraphs and about to
reach at the recommendation section, it should shift recommendation
heading
to the next page at the top. In this way This heading will always stay at
top. Kindly help

For that heading, set the ParagraphFormat.PageBreakBefore property to True.
that will put the heading at the start of the next page under all
circumstances.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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