Visual Basic question: end of Page
Record a macro like this:
Click once where you are going to start your selection
Start the macro recorder;
give the macro a name you will associate with this process
Insert a bookmark called "StartSel"
CTRL+G (which is GotTo), Page, click Next, click Close
Press left arrow key once
Insert a bookmark called "EndSel"
Close the macro recorder
Now press ALT+F8, highlight the macro you just recorded, and click Edit.
Just under the first line ("Sub YourMacro()"), type:
Dim myRange As Range
Copy the following lines from this post:
Set myRange = ActiveDocument.Bookmarks("StartSel").Range
myRange.SetRange _
myRange.Start, _
ActiveDocument.Bookmarks("EndSel").Range.End
myRange.Select
Paste these into the macro just above End Sub.
HTH
Ed
"markvi" wrote in message
...
I'm new to Visual Basic. I am curious as to why there are document
elements
for words, paragraphs & sections but not for pages.
Within a multi-page document, I am trying to select text from a point
midway
down a page to the end of the page (the number of paragraphs is variable
on
each page) in order to reformat that portion of each page.
Any suggestions?
--
- markvi
|