Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Returning the font size from a .txt and .doc

Posted on 2003-03-05
4
Medium Priority
?
253 Views
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!!?
0
Comment
Question by:tay_highfield
3 Comments
 
LVL 6

Accepted Solution

by:
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:

http://www.aozw65.dsl.pipex.com/generator_wword6.htm

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

Author Comment

by:tay_highfield
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.
0
 
LVL 20

Expert Comment

by:jmcg
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
Suggested Courses

581 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