Advertisement

05.22.2007 at 11:16AM PDT, ID: 22588017
[x]
Attachment Details

Find and Replace Words inside Chevrons

Asked by rockiroads in Microsoft Office Suite, Microsoft Word, Microsoft Applications

Tags: replace, words, find

Howdo office experts.

Looking for a way to go thru a word document and find words inside tags and replace that word with something else.

So basically a word doc which has say lots of these, all with variable text

Hello there <fred1>

<fred2>

some text here
some text there

<fred3>

wow this is a <fred4> letter

<fred1>

the last line


So Im after a vba macro which goes from top to bottom of doc that looks for words within < > and replace with summat else.

Problem with chevrons is they are reserved for wildcard searches.

I found u can do [<>]  but then that find the first <  then next >. I dont want the hassle of figuring out the words in between - unless someone can do it for me that is :)

Each match I find, I will replace it with text. For the purpose of this question, just replace with "BBC"

Once it gets to the bottom of the document, it stops.

I think replacement part is easy,  can use Find.Execute and specify with ReplaceAll,
well so I think. Difficult part is trying to get the text between chevrons

Cheers!Start Free Trial
[+][-]05.22.2007 at 11:51AM PDT, ID: 19136405

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2007 at 11:55AM PDT, ID: 19136431

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2007 at 12:05PM PDT, ID: 19136502

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2007 at 12:32PM PDT, ID: 19136750

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2007 at 12:47PM PDT, ID: 19136874

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.22.2007 at 01:13PM PDT, ID: 19137089

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2007 at 01:21PM PDT, ID: 19137139

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2007 at 02:33PM PDT, ID: 19137694

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2007 at 09:29AM PDT, ID: 19142860

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2007 at 10:49AM PDT, ID: 19143491

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2007 at 10:52AM PDT, ID: 19143537

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2007 at 10:53AM PDT, ID: 19143540

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2007 at 11:22AM PDT, ID: 19143806

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.24.2007 at 10:10AM PDT, ID: 19150997

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Office Suite, Microsoft Word, Microsoft Applications
Tags: replace, words, find
Sign Up Now!
Solution Provided By: GrahamSkan
Participating Experts: 2
Solution Grade: C
 
 
[+][-]06.23.2007 at 12:01AM PDT, ID: 19346777

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32