Get font info from Word Doc

Can I open a Word Doc in VB and get the font name, size, and color for a single word in the document?

I have been doing a lot of searching and I have only found how to change the color of a word, but not identify it.  I also haven't found ANY good support for the Word Object Library, so if you have any good links that would be great.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

not sure if this is exactly what you're looking for, but it may help:

Dim objWord As Word.Application
Set objWord = New Word.Application
With objWord.Selection.Find
            .Text = "<SoftwareID>"
            .Replacement.Text = Replace(Replace(Trim(SoftwareIDArray(LoopWord)), "0", "#"), "O", "@")
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
End With
objWord.Selection.Find.Execute Replace:=wdReplaceAll

and try this reference:
try it , after opening the document . returms the font name.

Dim strFile As String
 Dim appWord As New Word.Application
 Dim docWord As Word.Document
 Set docWord = appWord.Documents.Open("File Name with Path", False)
 Text1.Text = docWord.Content.Font.Name
Hi APlusComp247,
Your best reference to the Word object library is the MSWord help file. Open the contents tab, and look near the bottom under 'Programming Information'. Under 'Getting Started with Microsoft Word Visual Basic' you will find a chapter on 'Working with Word Objects'

Regards .. Alan
You can do it by word, or by character (in case a word has more than one font, for some reason).  If you know which word in the active document you want to check (e.g. the 3rd word), you can use:

           strFontName = ActiveDocument.Words.Item(3).Font.Name
           intFontSize = ActiveDocument.Words.Item(3).Font.Size
           lngFontCol = ActiveDocument.Words.Item(3).Font.Color
           intFontColI = ActiveDocument.Words.Item(3).Font.ColorIndex

If you want the 3rd character, substitute






Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
APlusComp247Author Commented:
Thanks jimbobmcqee!!!!  It works great!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.