#1
|
|||
|
|||
Word Marco Help - removing tagged text
I want to create marco in Word which will remove text between 2 tags throughout a document, for example
{begin tag} This is the text to be removed. {end tag} The tagged text will appear throughout a large document and will have multiple instances where it needs to be removed. These tags will always be the same and the text needs to be deleted between the 2 tags. This will allow me to maintain 2 different versions of a similar report in one document and generate 2 final reports with a macro. Any ideas if this can be done and if so how? thanks, Matt |
#2
|
||||
|
||||
Hi Matt,
Providing the blocks of text to be removed aren't too long, you can do this with a wildcard Find/Replace, where: Find = \{begin tag\}*\{end tag\} Replace = nothing
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks Paul. I will try this. The amount of text can be several paragraphs maybe even a page. Would that be too much?
|
#4
|
|||
|
|||
Hi Paul - This worked great on my test document (after I turned on wildcards). Any ideas on what the limitation might be on the amount of text between tags?
thanks for your help, Matt |
#5
|
||||
|
||||
Hi Matt,
I'm not sure what the upper limit is, but a quick test with a 16-page block with 75k+ characters worked OK.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Hi Paul- Thanks for your help on this. This has worked out perfect, I completed my macros and all is working great!!!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Removing tabs | Taylor | Word | 10 | 11-28-2011 03:38 PM |
Removing Office Starter | BigJohn | Office | 1 | 11-25-2011 07:26 AM |
Removing protected appointments | jessejane | Outlook | 1 | 09-02-2011 10:21 AM |
Removing Custom XML | Ulodesk | Word | 0 | 06-24-2011 09:01 AM |
Removing All Formating | basscarp | Word | 0 | 01-31-2010 05:49 PM |