Accessing  .doc Files From Within a C++ Program

Topace
Topace used Ask the Experts™
on
Hello Everyone.

Here is what I am trying to do, it takes some explanation, so bear with me:

At my fraternity, we use HTML and Word .doc files to post minutes of our meetings.  Most of the minutes are the same, except for a few things that have changed from meeting to meeting (ex. old business, new business, etc..)

What I am trying to do is write a program that will prompt the secretary for certain items.  For instance, a sample output prompt screen would be ( >> indicates user input):

**** WELCOME MESSAGE HERE ****
What time was meeting called to order?
>> 7:01 pm

Were the minutes from last meeting (A)pproved, (T)abled, (R)ejected, or (O)mitted?
>> A

Please enter old business, with a return seperating each different item:
>> Elections were held, results are as follows...

Thank You
**** END OF PROGRAM ****

Then, the program would take the information given, and, using a template, transfer it into both an HTML file (for web posting), and a .doc file (for transfer to hard-copy records).  

The problem I have is this - I have never done Win32 programming.  Therefore, I am trying to make a DOS Program that recognizes Win32 file types.  Hence, it is rather difficult.  I can easily make the HTML type, because I know how the source code will read.  The problem with the .doc type is that I know nothing about how .doc files are organized.  Does anyone know how I might be able to go about doing this?

If you would like to see example minutes, you can go to our fraternity web page at: http://www.pikapps.net and click "Home", then the "Minutes" menu, and then finally, select some of the minutes from 2002.  (The older ones are not organized very well).

Thanks to everyone willing to help me.  

~ace

"In the role of Cosmic Dice, you win one hard, and lose it twice."  - Jimmy Buffett
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I'm not totally sure but I don't think you can mix HTML will C++ like that........ in DOS ofcourse.....

Author

Commented:
Sure you can.  It's just going to be a simple text-based file with HTML code.  The output will be in HTML, but the program won't know that - it will just think it is writing to a simple text file.  

I have that part completed ok.  What I need to do is to develop a way to edit .doc files so that I can maintin consistent formatting amongst different minute files.

Thanks,

ace~

Commented:
Save your template in RTF format. That is a text format (like HTML but way more complex). You should be able to figure out a text subsitution technique.
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Author

Commented:
GGRundy -

I have never used RTF before.  I mean, I have used the file type before, but I have never done substitution within an RTF file.  Is there a place I might be able to reference the RTF format so that I can have a general understanding of how to make a template?  

I have come to the realization that I would much rather do the substituion in RTF format than MS Word .doc files, but I am stil unsure as to how to go about it.

~ace


Commented:
http://www.biblioscape.com/rtf15_spec.htm

BUT....

I really wouldn't spend much time on the spec you'll get lost forever.

Just type up roughly what you want in Word.
Save it as an RTF file.
Then open that file as text in Notepad, (not Wordpad)
to see the contents what where you need to substitute.

Commented:
This question didn't show any activity for more than 21 days. I will ask Community Support to close it unless you finalize it yourself within 7 days.
You can always request to keep this question open. But remember, experts can only help if you provide feedback to their comments.
Unless there is objection or further activity,  I will suggest to accept

    "GGRUNDY"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
========
Werner

Author

Commented:
Thank you for all of your help.  I have decided to use RTF format.  Sorry I took so long to respond.

~ace

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial