1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: deleting/searching in ms word

Discussion in 'Business Applications' started by iltos, Jan 23, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. iltos

    iltos Thread Starter

    Joined:
    Jun 13, 2004
    Messages:
    18,287
    i was just emailed a hundred page document, which is nothing more than a compilation of electonic forms....each form is two pages, so i have fifty copies of an identical cover letter, and fifty pages of the unique info of each form

    i use word as a word processor, tho i know it has more complex features...... i'm not looking forward to sifting through a hundred pages of info to find what i need.

    is there a quick way to delete the fifty copies of the cover letter and then identify the unique email addies on each of the remaining pages?
     
  2. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    I'm not a Word MVP, so I think there's a quicker way to do this but I don't know it. My proposal would involve a macro (at least, to delete the cover sheets). I think there might be a way to manage hyperlinks (read: email addresses) via the application (i.e., not through code), but that could be part of the macro as well.

    What version of Word do you use?

    chris.
     
  3. iltos

    iltos Thread Starter

    Joined:
    Jun 13, 2004
    Messages:
    18,287
    hi christobal

    ms word 2002, sp3....is that service pack 3? (i quickly realize what a dang neophyte i am with my own stuff whenever i seek help here at tsg :rolleyes: )
     
  4. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    Hehe, me too.

    And yeah, that is indeed Service Pack 3. Not too important, but thanks (y)

    So, hey. I don't know; how comfortable are you with implementing macros? And because this is pretty...page-specific, can you confirm that the odd-numbered pages are always cover sheets? Here's my game-plan:

    • Starting from the end of the document, work backward deleting all the odd-numbered pages.
    • Collect all the hyperlinks containing an @ character (seems to be the only thing you need).
    • Create a new document, list the email addresses, delete duplicates, and sort in ascending order alphabetically.
    I don't know how long it'll take me to bang something like that out, a couple hours maybe if I don't get tasked with something in the meantime. Also, I could walk you through creating the macro and running it, if you need.

    Does this sound like something you want to try? I imagine you could probably delete the cover sheets in 3 or 4 minutes on your own. I could spend my time researching the hyperlink thing instead of trying to program something.

    What do you think?

    chris.
     
  5. iltos

    iltos Thread Starter

    Joined:
    Jun 13, 2004
    Messages:
    18,287
    i think it's a great idea, and i truely appreciate the offer

    naturally, it won't be that simple.....i, too, had assumed that the cover letter was the odd numbered pages (makes complete sense, doesn't it?)....but unfortunately the mailing, or the sender, tweaked the document somehow, so that everything important to me is scattered across even and odd pages

    but searching for @ is a great idea....maybe i don't have to delete anything...i'll give that i try.
     
  6. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    Well, let me know how it goes, there are other avenues to pursue. For example, if the cover sheets contain the text Cover Sheet and the same text "cover sheet" does not appear on the forms, we could still delete the cover sheets.

    It sounds like you plan on manually searching for the email URLs, is that correct? If so, let me know if you want me to start working on something for you.

    chris.
     
  7. iltos

    iltos Thread Starter

    Joined:
    Jun 13, 2004
    Messages:
    18,287
    well, yeah, that was my intent....but i realized quickly that THAT'S gonna drive me insane (no wonder i work outside)

    so then i tried the "find" function again, opened the "more" tab, highlighted "field", then "hyperlink", which puts the cursor in front of the first hyperlink in the text....but there's no "highlight all" function, so i'd have to go through that process for every hyperlink, which amount to the same thing as your @ idea, and is essentially a manual search with a bit-o-help

    so....is that what macros can let you do? find'em all and save'em all in one shot?....if so, i'm back to really, REALLY appreciating your offer for help....never used a macro :eek:
     
  8. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    Not a problem. Let me do a little digging around and I'll bump some code (or lack thereof, but I doubt it) in a bit.

    chris.
     
  9. Anne Troy

    Anne Troy

    Joined:
    Feb 14, 1999
    Messages:
    11,746
    First Name:
    Anne
    Hi, iltos (hi, Chris!).

    Iltos, you may be able to use this:
    http://vbaexpress.com/kb/getarticle.php?kb_id=43
    You don't have to move the page, it'll select it, you can delete it with your delete key. When you use that macro, try first hitting View-->Zoom and choosing to view like 6 pages at a time...that could speed things up.

    Secondly, try something like this: If you have hyperlinks, likely you click on it and they have the style Hyperlink applied. CHANGE that style to have red text. Then do a find for any text that's colored "automatic" and replace with...nothing!

    Of course, you should save your file to another name before testing all this stuff.
     
  10. TonyJollans

    TonyJollans

    Joined:
    Jun 24, 2004
    Messages:
    114
    I think this can probably be done fairly easily - but it will depend on the format of your doument and maybe the version of WOrd.

    Firstly, when you say "Find", I think you mean "Go To" - please confirm and, if so, check out "Find" proper (Ctrl+F from Word, or the Find tab in the same dialog as Go To). Does it have a "Highlight all Items found" - I only have 2003 in front of me and I'm not sure if this is in 2002.
     
  11. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    Wee, Anne, haven't seen you around in quite a while!

    That's an interesting solution (which is why you're the author and I'm the guy who's always after programmatic solutions lol).

    iltos, that's going to be a lot easier than anything I could come up with. Let me know if you're still interested though.

    chris.
     
  12. iltos

    iltos Thread Starter

    Joined:
    Jun 13, 2004
    Messages:
    18,287
    wow....all the suggestions from everybody are wonderful....thanks...i got bumped offline (windy today, and "this old house" needs bob vila and his electrical crew ;) )

    dreamboat ....the page layout being as tweaked as it is, deleting the cover letter isn't going to work (that was mostly for me anyway, looking at ALL those pages ;) ) ....still, i bookmarked the link to your code (y) ....ya just never know when i might need it

    but the "dehyperlinking" idea is a very good one....tho i'm still confused about how to select all the hyperlinks simultaneously.....to confirm tony's assumption (in the post below yours), yes, i do have the "highlight all" option under find....but i've looked through most all the options (tried selecting blue, underlined under "font", and also the "followed hyperlinks" under "style", without success).....chris' idea of finding @ works, but it, of course, doesn't highlight the characters on either side

    i know i'm missing something that's probably simple and basic....any suggestions?
     
  13. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    Sorry to interject, Anne's suggestion involves modifying the style Hyperlink using (from the menu bar) Format-->Style.... You'd Modify the style to have red text, then in the Find and Replace dialog, show More, choose Font... from Format, and select Automatic as the Font color.

    Replacing that with nothing should leave only the (now) red hyperlinks, and you can do whatever you want with them. Of course, that'll catch all hyperlinks, so if there are web addresses in the forms, you'd get those too.

    I could itemize those steps to be more clear if that would help.

    chris.
     
  14. TonyJollans

    TonyJollans

    Joined:
    Jun 24, 2004
    Messages:
    114
    Hi iltos,

    Thank you for confirming that. To get all the e-mail addresses, try this ....

    Press Alt+F9 to toggle field codes
    Press Ctrl+F to get the Find Dialog
    In the Find what box enter ^d hyperlink "mailto
    Check the "Highlight all Items" checkbox
    Press "Find All"
    Click on Close
    Press Alt+F9 to toggle field codes off
    Press Ctrl+C to copy all the e-mail hyperlinks found
    Press Ctrl+N to open a new document
    Press Ctrl+V to paste the e-mail addresses
     
  15. iltos

    iltos Thread Starter

    Joined:
    Jun 13, 2004
    Messages:
    18,287
    well, chris and dreamboat, and tony.....that was amazing....

    i tried both solutions, and both worked wonderfully....i now have two documents....one with about 25 pages of all the hyperlinks in the document, and another with about 20 pages of just the email addys....

    i like yours dreamboat...its a very intuitive, seat-o-the-pants way of approaching the problem, works the way my head does, and gave me a lot of insight into what is possible with word.

    but yours, tony....sheesh....crisp and clean, an example of just how powerful word is, and how little i will probably forever know

    thank you all, especially you chris, for taking up the whole situation in the first place, and clearing up my confusion about dreamboat's idea (y)

    this thread is solved :)
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Solved deleting searching
  1. adityaupadhye47
    Replies:
    1
    Views:
    224
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/436516

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice