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.

Word 2007 Delete Macro

Discussion in 'Business Applications' started by ksrcheck, Mar 30, 2009.

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

    ksrcheck Thread Starter

    Joined:
    Mar 30, 2009
    Messages:
    3
    I need to create a subset of a Word document automatically. Can a macro be created that looks for some "start" tag in the document (like a bookmark or some hidden character) and deletes that part of the document until it hits an "end" tag. Then it continues to search the document for the next set of tags and repeats the deletion process until hitting the end of the document. The result is that those sections without the tags remain. I am VERY new using macros so appreciate any ideas of how to accomplish this.
     
  2. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,271
    Welcome to the board. :)

    The obvious question is ... what (bookmark, special character, whatever) already exists within the "master" document for any code to be able to get its bearings from?
     
  3. ksrcheck

    ksrcheck Thread Starter

    Joined:
    Mar 30, 2009
    Messages:
    3
    Hi. I am flexible. I was not sure what the macro could handle. Any recommendations for what to use to create a "hidden" tag that the macro could look for?

    Karen
     
  4. ksrcheck

    ksrcheck Thread Starter

    Joined:
    Mar 30, 2009
    Messages:
    3
    Can anyone help? I have now created two bookmarks, one called "Start" and the other "End. I have tagged a section of text that I want to delete. How do I create the macro to do this:
    - Find the first Start bookmark.
    - Delete content until hitting the End bookmark.
    - Continue to search the document for the next Start bookmark.
    - Repeat the search and delete until there are no more Start bookmarks found.
    - Save the file as "New File".

    Thanks to anyone who can help!!
     
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...
Thread Status:
Not open for further replies.

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