Anyone interested in answering this question - I have a lot of background
info below, but the meat of the question is the last paragraph if you're
interested in jumping ahead.

Our company has a "Corporate Resume" system that is antiquated, but I need
to make the best of it. After running a macro, we have a Word document that
is composed of paragraphs that describe what an engineer did on a certain
projects. There are as many paragraphs as projects.

The trouble is that a satellite office of ours decided they needed to
fine-tune this system and further categorize the paragraphs. They do so by
putting numbers in front of each paragraph; frequently, there is more than
one number in front of a paragraph.

I need to be able to check each paragraph and figure out which category(ies)
it is. Then, if it has more than 1 category, pick off each category number
and capture the remainder of the paragraph (sans other numbers), then do that
for the remaining numbers (if I have three categories, I end up repeating the
paragraph three times).

It's easy enuf to copy the paragraph to the clipboard and convert it to
string, then examine it for categories. I also need to keep the paragraph
formatting (specifically, keep certain parts of it bold).

What I'd like to do is look at each characters (or group) of the paragraph
and find out if it's formatted, and how so.

My question boils down to, is it possible to look at a chunk of text on the
clipboard and figure out how it's formatted on a character level, then
remember the formatting and paste the text? Thank you for any thoughts.

Re: Pulling apart text on a clipboard by Doug

Doug
Tue Apr 01 20:11:01 PDT 2008

You cannot "look at it" and make such a determination on the clipboard. You
can however get information on the formatting of the paragraph (.Range)
itself in the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Rich W." <RichW@discussions.microsoft.com> wrote in message
news:6A56A7D0-D5CD-43B7-9415-6C2F5B7997A3@microsoft.com...
> Anyone interested in answering this question - I have a lot of background
> info below, but the meat of the question is the last paragraph if you're
> interested in jumping ahead.
>
> Our company has a "Corporate Resume" system that is antiquated, but I need
> to make the best of it. After running a macro, we have a Word document
> that
> is composed of paragraphs that describe what an engineer did on a certain
> projects. There are as many paragraphs as projects.
>
> The trouble is that a satellite office of ours decided they needed to
> fine-tune this system and further categorize the paragraphs. They do so by
> putting numbers in front of each paragraph; frequently, there is more than
> one number in front of a paragraph.
>
> I need to be able to check each paragraph and figure out which
> category(ies)
> it is. Then, if it has more than 1 category, pick off each category number
> and capture the remainder of the paragraph (sans other numbers), then do
> that
> for the remaining numbers (if I have three categories, I end up repeating
> the
> paragraph three times).
>
> It's easy enuf to copy the paragraph to the clipboard and convert it to
> string, then examine it for categories. I also need to keep the paragraph
> formatting (specifically, keep certain parts of it bold).
>
> What I'd like to do is look at each characters (or group) of the paragraph
> and find out if it's formatted, and how so.
>
> My question boils down to, is it possible to look at a chunk of text on
> the
> clipboard and figure out how it's formatted on a character level, then
> remember the formatting and paste the text? Thank you for any thoughts.



Re: Pulling apart text on a clipboard by fumei

fumei
Wed Apr 02 12:48:05 PDT 2008

"It's easy enuf to copy the paragraph to the clipboard and convert it to
string, "

There is no "and convert".

You copy the paragraph into the clipboard and it IS a string. It is
formatted text.

Methinks your issue would be better resolved with standardized use of Styles.


Rich W. wrote:
>Anyone interested in answering this question - I have a lot of background
>info below, but the meat of the question is the last paragraph if you're
>interested in jumping ahead.
>
>Our company has a "Corporate Resume" system that is antiquated, but I need
>to make the best of it. After running a macro, we have a Word document that
>is composed of paragraphs that describe what an engineer did on a certain
>projects. There are as many paragraphs as projects.
>
>The trouble is that a satellite office of ours decided they needed to
>fine-tune this system and further categorize the paragraphs. They do so by
>putting numbers in front of each paragraph; frequently, there is more than
>one number in front of a paragraph.
>
>I need to be able to check each paragraph and figure out which category(ies)
>it is. Then, if it has more than 1 category, pick off each category number
>and capture the remainder of the paragraph (sans other numbers), then do that
>for the remaining numbers (if I have three categories, I end up repeating the
>paragraph three times).
>
>It's easy enuf to copy the paragraph to the clipboard and convert it to
>string, then examine it for categories. I also need to keep the paragraph
>formatting (specifically, keep certain parts of it bold).
>
>What I'd like to do is look at each characters (or group) of the paragraph
>and find out if it's formatted, and how so.
>
>My question boils down to, is it possible to look at a chunk of text on the
>clipboard and figure out how it's formatted on a character level, then
>remember the formatting and paste the text? Thank you for any thoughts.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200804/1