Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
For great how-to tips and general programming information, check out the Word
programming forum in the Office Discussion Groups community. -- Kevin Backmann "markvi" wrote: 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 |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi Mark -
The simplest & most direct answer to your question is that 'pages' actually _do not_ exist in a Word document. It simply tries to give the user an idea of how many sheets of paper will be required to print the "words, paragraphs & sections" the file does contain based on the specifications for margin settings, line spacing, paper size, etc. If you change any of those settings, the content reflows & may very well require a different number of 'sheets'. HTH |:) "markvi" wrote: 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 |
#5
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Thanks for clearing that up, but doesn't seem too practical an idea to me.
-- - markvi "CyberTaz" wrote: Hi Mark - The simplest & most direct answer to your question is that 'pages' actually _do not_ exist in a Word document. It simply tries to give the user an idea of how many sheets of paper will be required to print the "words, paragraphs & sections" the file does contain based on the specifications for margin settings, line spacing, paper size, etc. If you change any of those settings, the content reflows & may very well require a different number of 'sheets'. HTH |:) "markvi" wrote: 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 |
#6
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Thanks - I'll look that up
-- - markvi "Kevin B" wrote: For great how-to tips and general programming information, check out the Word programming forum in the Office Discussion Groups community. -- Kevin Backmann "markvi" wrote: 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 |
#7
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Gee that looks easy.(?) Thanks for the solution & all the effort. I will give
it a try when I have time. -- - markvi "Ed" wrote: 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 |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Section Breaks - here's a test question | New Users | |||
Print individual page in book fold | Microsoft Word Help | |||
Page Numbers Print { PAGE } in Footer in WORD even after ALT + F9 | Microsoft Word Help | |||
section breaks change each time opening document | Microsoft Word Help | |||
Odd page section break | Page Layout |