Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
brett - 05 Sep 2005 17:46 GMT
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
Doug Robbins - 05 Sep 2005 18:32 GMT
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

Signature

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

> Hi there
>
[quoted text clipped - 6 lines]
>
> brett
brett - 05 Sep 2005 22:51 GMT
>Dim DaftDoc As Document, i As Long
>Set DaftDoc = Documents.Add
[quoted text clipped - 5 lines]
>    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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.