Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Effecent Navigating (Word 97 and XP)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Loungers

    I have exported a bunch of Lotus Notes e-mail messages to a text file. Now at each beginning of a message I have a Page Brake, and then the header of the e-mail.

    I want to delete all these headers so that I can have a clean document, but I don't want to keep scrolling up and down. So I am in the need of some key strock(s) that would take me to the Page Brakes setting them at the top of the screen so that I can highlight the header section and delete.

    If there is a VBA macro that can do that automatically, well that is even better. I think the header starts and ends the same way for each of these messages, that means I can find land marks if they are needed.

    Thanks in Advance.

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Effecent Navigating (Word 97 and XP)

    Will Control-PageDown do what you want, or were you looking for something more sophisticated?

    StuartR

  3. #3
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Effecent Navigating (Word 97 and XP)

    Thanks StuartR

    But Control-Page-Down will display a new page, but not necessarily go to a specific section, where the page breaks are.

    I can use it instead of scrolling, but the idea is to emulate the Bookmarks behavior without having the book marks.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Effecent Navigating (Word 97 and XP)

    So how about find ^m (Manual page break) to go to the first one and then use the small double arrows at the bottom of the vertical scroll bar to do a "Find Next" for the others.

    StuartR

  5. #5
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Effecent Navigating (Word 97 and XP)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> StuartR

    Thanks

    That did the trick. I used to use the Blue arrows on the vertical scroll bar, but did not know exactly their functions. I thought that they are similar to PageUp and PageDown

    Now maybe I can impose another question on you:

    If I work with your suggestion, Word will highlight the page break, but it will not push it up to the top of the screen so I still need to manually scroll a bit, is there a way to eliminate that and have Word set the selection on the top of the screen so that I can highlight and delete?

    Thanks again

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20> but at least with <img src=/S/eyeout.gif border=0 alt=eyeout width=15 height=15> and not totally <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  6. #6
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Los Angeles, California, USA
    Posts
    289
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Effecent Navigating (Word 97 and XP)

    Wassim,

    The blue "browse" arrows (by the way, they are black if set to "browse by page") will search for a "browse object" which you can set using the round button in between them.

    Try setting the "browse object" to Section, then use the blue buttons; that ought to select just what you are looking for.

  7. #7
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Effecent Navigating (Word 97 and XP)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Van

    I keep learning stuff about MS-Word. Thanks. This does now help in knowing all the options, but again any of them make the selection go to the top of the screen?

    Maybe VBA can do it, but again I need help with Word's VBA.

    Maybe if I stick around here long enough some of this will sink in <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  8. #8
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Effecent Navigating (Word 97 and XP)

    Try useing the find dialog box to search for ^m^&

    This will search for a manual page break followed by any character. It will leave the page break and the next character selected, with the character after the page break at the top of the screen.

    StuartR

  9. #9
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Effecent Navigating (Word 97 and XP)

    In Word2000, for what it's worth, that would be ^m^? (or, if you are using Wildcards, ^m?). It scrolls the found text to the top when it was not already on the same screen.

    But...a little VBA can go a long way in cases like this. After you conduct the above find (which you can record, for ease of input), you can extend the selection to the end of the header by turning on Selection.Extend and doing another find for whatever the appropriate marker is. And then delete it.

  10. #10
    Lounger
    Join Date
    Dec 2001
    Location
    Reston, Virginia, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Effecent Navigating (Word 97 and XP)

    Since the header starts and ends the same way, sounds like your challenge can be easily overcome by using Replace with wildcards enabled. It sounds like each header starts with a Page break, and that each Page break is followed by a header. This means that starting the search text with ^m will only find the start of a header. Now identify a character string that first occurs at the end of the header. For purposes of this example, assume the string is "<End>". Now just bring up the Edit, Replace dialog box. In the Find what: field enter ^m*<End>, delete any text in the Replace with: field, and enable Use wildcards. (The back slashes are needed before the < > because they are special characters in wildcard searches.) Do Find, and the Word will make a selection starting with the next page break and then all characters (the asterisk wild card) through the first <End> found, which should be the next complete heading and not include any text you wish to preserve. Do Replace, the heading is deleted and the next heading selected.
    Bear in mind that alpha chars entered into the Find field are case sensitive, and also that there doesn't appear to be any way to find a paragraph mark (^p when Wildcard search is disabled.) If the <End> (continuing the above example) in the heading is followed by a paragraph mark that you also wish to delete, then add a ? (representing any character) to the end of the Find what field. The selection found will then include the paragraph mark.

    For more info, refer to Word help "Examples of Search Wildcards"

    Hope this helps.
    Marty

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Effecent Navigating (Word 97 and XP)

    You can search for a paragraph mark in a wildcard search: use ^13 (in the replace text, you still need to use ^p).
    See http://www.mvps.org/word/FAQs/Genera...gWildcards.htm

  12. #12
    Lounger
    Join Date
    Dec 2001
    Location
    Reston, Virginia, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Effecent Navigating (Word 97 and XP)

    Hans,
    Thanks so much for that tip!! <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23> I thought I had tried that a long time ago and it didn't work. My work-around has been to first replace ^p with ^l (non-wildcard search), then do the wildcard search with ^l, then restore the ^p. Your tip will definitely simplify that!

  13. #13
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Effecent Navigating (Word 97 and XP)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Marty

    I guess this is why they call you Chief Marty <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> Thanks a lot for the excellent explanation of Word's finer points. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

    OK here are the steps I went through:

    1) I opened my document
    2) I looked at the last line of the header and it has <font color=red> DeliveredDate: </font color=red>
    3) From the Edit menu I chose Find.
    4) Find dialog comes up I clicked More
    5) I clicked Special and selected Manual Page break which placed <font color=red> ^m </font color=red> in the Find what field.
    6) Then in the Find what Field I typed *<DeliveredDate:> so it looks like <font color=red> ^m*<DeliveredDate:> </font color=red>
    7) I clicked the Use Wildcards
    8) I clicked Find Next...

    And Word told me that it finished searching the document but could not find the search item <img src=/S/exclamation.gif border=0 alt=exclamation width=15 height=15> <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    Which step did I mess up <img src=/S/shy.gif border=0 alt=shy width=15 height=15>

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  14. #14
    Lounger
    Join Date
    Dec 2001
    Location
    Reston, Virginia, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Effecent Navigating (Word 97 and XP)

    Since your file does not have the characters <font color=red>< ></font color=red> around <font color=red>DeliveredDate:</font color=red>, just remove the <font color=red><</font color=red> and <font color=red>></font color=red> from the Find field.
    BTW, if there is a date in the heading following DeliveredDate: that you also wish to delete, and that date always ends with 2002, you could make the Find field <font color=red>^ m*DeliveredDate:*2002</font color=red>
    Then the selection will be extended to include the first 2002 following DeliveredDate:
    Alternatively, if the date is always a fixed number of characters, then follow <font color=red>...Date:</font color=red> with a <font color=red>?</font color=red> for each character to include the date.

  15. #15
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Effecent Navigating (Word 97 and XP)

    Chief Marty

    Yes there is a Time and a date so I used your suggestion and I put an M for AM and PM, Oh Thank God for Standarization.

    This project turned out to be simpler, with all Lounger's help <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23> <img src=/S/bow.gif border=0 alt=bow width=15 height=15>, than expected.

    OK Chief one more question if I may impose <img src=/S/shy.gif border=0 alt=shy width=15 height=15>

    Is there a way to grab the column number from the statusbar? Yes I know this has been done by many people but I want to write my own code that would clean hard CRs and line Feeds. I would appreciate the examples, but I think it would give me a chance to learn Word's object model and VBA.

    I am thinking if I know the page width 8.5 or 11 and the margins that I have set in Page setup then I can find out the maximum length of the line, and then if I go to the end of a line and it turns out that I am not at column number X then i will check to see if the last character is a CR or a LF and if there are two of them back to back and then delete them causing the lines to become spanning the width of the page.

    is that doable, and if anyone cares to give me a starting point I would appreciate it.

    Thanks

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •