How to create x amount of pages and then navigate to those pages in word

B

brett

Hi there

I want to create a word document with x amount of pages (this can be
anything between 1 and 50 pages) then be able to say goto page #x

This is all I need, I can do the rest np

Any help anyone can give me would be greatly appricated

brett
 
D

Doug Robbins

Sorry, but the name of the document will give you an idea of what I think
about what you want to do:

Dim DaftDoc As Document, i As Long
Set DaftDoc = Documents.Add
With DaftDoc
For i = 1 To 50
.Range.Collapse wdCollapseEnd
Selection.InsertBreak Type:=wdPageBreak
Next i
Selection.EndKey Unit:=wdStory
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
B

brett

Dim DaftDoc As Document, i As Long
Set DaftDoc = Documents.Add
With DaftDoc
For i = 1 To 50
.Range.Collapse wdCollapseEnd
Selection.InsertBreak Type:=wdPageBreak
Next i
Selection.EndKey Unit:=wdStory
End With

Thank you very much

I give that a try tommorrow, thanks for the note on the document title
:)
It is a what I have been asked to create (I am a university student on
a placment), who am I to tell my boss what he wants is, as Doug
Robbins called it, "Daft".

Thank again

Brett
 

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