Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
Hi John,
You could add your own numbered bookmarks for all the lines. The macro below does that. It should work in simple cases, though not if you suppressed numbering for some paragraphs or styles, or if you don't restart numbering on each page... The bookmarks all have the form myPXX_LYY where XX is the (adjusted) page number, and YY is the line number. If you're done, you can delete all bookmarks starting with "my" using the second macro. Regards, Klaus Sub myBookmarksLineNumbers() Dim myLine As Line Dim myPage As Page Dim sBookmarkNamePage As String Dim sBookmarkNameLine As String For Each myPage In ActiveDocument.ActiveWindow.Panes(1).Pages sBookmarkNamePage = "myP" & myPage.Rectangles(1).Range.Information(wdActiveEnd AdjustedPageNumber) For Each myLine In myPage.Rectangles(1).lines sBookmarkNameLine = "L" & myLine.Range.Information(wdFirstCharacterLineNumbe r) ActiveDocument.Bookmarks.Add _ Name:=sBookmarkNamePage & "_" & sBookmarkNameLine, _ Range:=myLine.Range Next myLine Next myPage End Sub Sub myBookmarksDelete() Dim myBookmark As Bookmark For Each myBookmark In ActiveDocument.Bookmarks If left(myBookmark.Name, 2) = "my" Then myBookmark.Delete End If Next myBookmark End Sub "John" schrieb im Newsbeitrag ... Hi guys, I posted this question not long ago but I must have been unclear because the replies were fixing a different problem. I have WinXP with Word 2003. I set LINE NUMBERING on (in the LAYOUT tab of PAGE SETUP). Is there a way to make line numbering fixed such that each line with a particular line number retains that line number even if the line is moved from one place to another in the document during editing? --- Alternatively, how can I number the paragraphs such that if I move the paragraphs around during document editing, the paragraphs retain their paragraph number. Maybe I can start with auto paragraph numbering and then convert those variable numbers into fixed text? But how do I later remove the numbers embedded in the text? John |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I correct position of page numbers in Table of Contents | Microsoft Word Help | |||
how can I see the cursor's position in a line in numbers? | Microsoft Word Help | |||
Index using paragraphs numbers not page numbers | Microsoft Word Help | |||
Updating numbers on paragraphs | Microsoft Word Help | |||
Fixed text position | Microsoft Word Help |