Paste to next page

M

Mahesh

Hi All,
I'm creating word document thru VB6. The doc template has sections,
some are protected for Forms. With Word 2000, If I copy and paste the
contents of template at the end of page useing:

wordobj.ActiveDocument.Bookmarks("\page").Range.Select
wordobj.Selection.Collapse Direction:=wdCollapseEnd
wordobj.Selection.Paste
The pasted porting automatically goes to next page (making the last
section Next Page). This doesnt work with Word 2002. It pastes in the
same page continuing to next only when the page is full.

(The page has 6 sections in half portion of the page. I copy it before
inserting data in the form fields. every time I need one more
iteration of data, I paste it to fill the next section with data and
the paste is supposed to happen on next page.)

Any help would be appreciated.

Regards,
Mahesh
 
J

Jonathan West

Hi Mahesh

try this

wordobj.ActiveDocument.Bookmarks("\page").Range.Select
wordobj.Selection.Collapse Direction:=wdCollapseEnd
wordobj.Selection.InsertBreak Type:=7
wordobj.Selection.Paste
 

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