Interleaving pages into a word document.

Interleaving pages into a word document.

Post by Will Newma » Fri, 22 Aug 2003 01:24:07


Hello,

I am preparing a application to insert blank pages between
the pages of an existing document. I can open the document
up from the application (VB6 using OLE) and can access the
activedocument. I am using Word97.

I need to know the best way of going about this. The
process will be...

Open up document
Insert the blank page at alternative pages e.g. 1, blank,
2, blank etc.

I've managed to work out how to insert a page break but
can't work out how to make sure it does it at the end of
each page every time.

Your help with this would be greatly appreciated.

Will
 
 
 

Interleaving pages into a word document.

Post by martiniqu » Fri, 22 Aug 2003 08:52:54

You can find the first position on each page using the GoTo method:

ActiveDocument.Goto What:=wdGoToPage, Which:=2

This moves the selection to the first position on page 2. You might need to
insert a page break and at least one paragraph, otherwise if your page break
precedes (say) a paragraph with 'Page Break Before' selected Word will be
"smart" enough not to double up the page breaking.