Selection.MoveUp Unit:=wdLine, Count:=1
Selection.MoveDown Unit:=wdScreen, Count:=4, Extend:=wdExtend
Selection.MoveUp Unit:=wdScreen, Count:=2, Extend:=wdExtend
ActiveWindow.ActivePane.VerticalPercentScrolled = 49
Selection.Copy
Selection.EndKey Unit:=wdLine
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.PasteAndFormat (wdPasteDefault)
Selection.EndKey Unit:=wdStory
Selection.MoveUp Unit:=wdScreen, Count:=1
The above code worked at one time but now I can't get it to so I tried
something else.
I recorded a new macro, walking thru the steps that were necessary to make
the code do what I needed:
1. go to the top of the page I am on (Selection.HomeKey Unit:=wdWindow)
2. select part of that page (Selection.MoveDown Unit:=wdScreen, Count:=4,
Extend:=wdExtend)
3. copy all of that page (Selection.Copy)
4. go to the bottom of the current page (Selection.EndKey Unit:=wdWindow)
5. create a page break (Selection.InsertBreak Type:=wdPageBreak)
6. paste what was copied (Selection.PasteAndFormat (wdPasteDefault)))
7. go to the top of the new page (Selection.HomeKey Unit:=wdWindow)
But I keep getting an error on it. Run-time error '4120' Bad Parameter. I
go to Debug and it highlights the first line of the code.
Please help me get out of this circle of horror.
--
Thanks,
Rhonda
It appears you are using VBA with Word. This newsgroup is populated by users
of the 'Classic' VB development platform (VB6 and lower) having problems
with DirectX.
You will have better success if you post your question to a Word newsgroup,
perhaps microsoft.public.word.programming.
-ralph