I'm looping through the document at the character level to convert it to
another format. Needless to say, things are slow. Is there any way I can
quickly check if a paragraph or sentence contains font styling or a
special style such as hyperlink(so I can simply return the range.text
for those)?

Thanks,


--
---------------------------------
Trevor Lowing
Satellite Beach, Fl

tlowing@-removenospam-lowing.org
---------------------------------
Need help with:
Access?
http://www.mvps.org/access/
Outlook?
http://www.slipstick.com/
Visio?
http://www.mvps.org/visio/
HTML/CSS?
http://www.NCDesign.org
Scripting(VBScript/JScript/WSH/XML)?
http://www.DevGuru.com
http://cwashington.netreach.net/
http://developer.irt.org/script/script.htm
---------------------------------

Re: Find if paragraph or sentence contains font (italic,bold,etc) by Helmut

Helmut
Mon Mar 14 02:17:15 CST 2005

Hi Trevor,

I thought you would like to do that,
but your first posting about the object
model was a bit too theoretical for me.

Unless certain assumptions can be made,
I think, there is no answer. If almost
every second character is in some way
specially formatted, then there is no
use in thinking about objects hierarchy and
checking sections, storyranges, paragraphs
etc first, bevor arriving at the character
level.

If you wanted to locate just one special
formatting, of which you know nothing but
that is in some way special, then I'd check,
somewhat simplified:

Document, Paragraph, Words, characters
or without covering all:
document, sections, storyranges, paragraphs.

The best approach will be somewhere in between,
depending on your documents.

For example, if in a very simple document
MsgBox ActiveDocument.Range.Font.Name
returns "Arial" then all is Arial.
No different font at all.
If MsgBox ActiveDocument.Range.Font.Name
returns "", then there is a font different
from Arial somewhere. But beware of storyranges,
of course.

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000







Re: Find if paragraph or sentence contains font (italic,bold,etc) by Helmut

Helmut
Mon Mar 14 02:23:21 CST 2005

...
and have a look at this thread:

http://groups.google.com/groups?
hl=de&lr=&threadm=rT7Ld.9564%24Mm7.667701%40phobos.telenet-
ops.be&rnum=4&prev=/groups%3Fhl%3Dde%26lr%3D%26scoring%3Dd%
26q%3Ddirect%2Bformatting%2Bgroup%
253Amicrosoft.public.word.vba.*

or

http://tinyurl.com/6v4tl

Helmut Weber MVP WordVBA