Returning the font size from a .txt and .doc

Posted on 2003-03-05
Medium Priority
Last Modified: 2013-12-03
Hi all,

Am trying to write a piece of C code that will return the font size of a word in either a .txt file or a .doc file.

My code so far reads each word as a string and then outputs the number of times this word appears in the file in occurnace order.

As to now have had very little luck and would really appreciate any advice or sample code that someone has.

Thanks very much in advance.

Also does anyone know if functions written in C can be incorporated into a Visual Basic program!!?
Question by:tay_highfield
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

gj62 earned 200 total points
ID: 8073687
A TXT file does not have fonts associated with it, it will display the text in whatever the default font is for the application that opens the file.

If by .DOC file, you mean a Microsoft Word file, Microsoft changes the binary (.DOC) format with each release.  I'm sure there're some tools out there to read it, but I don't know of any.  A quick Google search turned up this, which describes the 6.0 format in detail:


You can write functions in C, compile them into a DLL, and use them in any language that can access a DLL.

Author Comment

ID: 8089516
Hi gj62,

Thanks for the help. Think i will leave this problem as it sounds like i am out of my depth. Will try this problem again when my C programming skills have improved.

Thanks again for the help.
LVL 20

Expert Comment

ID: 10058915
Nothing has happened on this question in more than 9 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by gj62.


EE Cleanup Volunteer

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question