Need Word macro - search, highlight, create new doc

Subject: Need Word macro - search, highlight, create new doc
From: anewton -at- EDUPRISE -dot- COM
To: techwr-l
Date: Fri, 18 Feb 2000 9:18:41

Hello,

This message is cross-posted to WinHlp-l.

Word 97 on Windows 98. . .

I can record the odd Word macro here and there, but at some point I need to
stand back and admit that I'm really just a macro stooge. . .

I was wondering if anyone out there has, can create, or can point me to a
Word VBA macro that would do the following:

1. Search for a word or phrase in a paragraph with a certain Word style
applied. For instance, search the document for all instances of "workers of
the world unite" in a paragraph styled as "Whatever". (I know you can do
this manually through Word's search/replace). . .

2. In the open document, I'd like the search to highlight (or otherwise
make distinct) the entire paragraph that contains the appropriate search
string and style.

3. I'd like the macro to also open a new Word document and copy each
paragraph into the document, preferably preserving the style of each
paragraph, inserting a page reference indicating where in the original
document the paragraph is, and inserting a carriage return or two between
ea. paragraph for ease of viewing.

Can anyone help?




Previous by Author: HTML authoring tool for creating HTML Company Newsletter
Next by Author: Need Word VBA macro - list style attributes
Previous by Thread: RE: Polite international e-mail
Next by Thread: Need Word VBA macro - list style attributes


What this post helpful? Share it with friends and colleagues:

Sponsored Ads


Sponsored Ads