View Single Post
  #13   Report Post  
Posted to microsoft.public.word.docmanagement
Helmut Weber
 
Posts: n/a
Default Few questions here

Hi,

pretty funny, looks rather like a joke.

However, if I had to fill 100 pages:

Sub pages100()
Dim l As Long
Application.WindowState = wdWindowStateMinimize
Application.ScreenUpdating = False
With Selection
.WholeStory
.Delete
.ParagraphFormat.RightIndent = InchesToPoints(5)
ActiveDocument.Range.Text = "Merry Christmas "
.EndKey unit:=wdStory
l = .Information(wdActiveEndPageNumber)
While l 101
ActiveDocument.Range.InsertAfter "Merry Christmas " & Chr(13)
.EndKey unit:=wdStory
l = .Information(wdActiveEndPageNumber)
Wend
.EndKey unit:=wdStory
.Delete ' some refinement possible here
End With
Application.WindowState = wdWindowStateMaximize
End Sub


In theory, there are other methods.
In former times, the task was how to fill a hard disk. ;-)
Take a file, concatenate it with itself,
take the result, and start again.
Until all crashes.
It's only that Word can't keep pace with inserting
the document's range after the document's range.
That would reduce the time to a fraction.

I think, whoever put that question,
didn't know in detail what he was asking for.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"