Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Saving to DOC format

Posted on 2000-02-21
4
Medium Priority
?
277 Views
Last Modified: 2013-11-20

I am trying to get some data into .doc file format.  The data I have is in a C++ program, and I am hoping that MFC or something can be used to put my data into MS Word format.  How can this be done?

0
Comment
Question by:AMD_MAN
4 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 400 total points
ID: 2542591
Hi AMD_MAN,

take a look at http://www.wotsit.org/cgi-bin/search.cgi?doc, there you can find some links to info about MS-Word's binary file formats. MFC has no built-in support for MS-Office files at all.

You could also use MS-Word automation insterface to open an instance of word and passing data to it, but this only runs on systems with word installed...

hope that helps,

ZOPPO
0
 
LVL 1

Expert Comment

by:RAVID
ID: 2542594
Hi,

U can use CFiledialog and specify the filters(the type of extension files u want to save or open).
CFileDialog dlg(TRUE,"rft","*.rft",OFN_OVERWRITEPROMPT|OFN_FILEMUSTEXIST,szFilter1,NULL);

In place of szFilter1 u can specify the extensions like

szFilter1 = "Text Files (*.doc)|*.doc";

and say dlg.DoModal();

Hope this helps U

Cheers Yo
0
 
LVL 1

Expert Comment

by:jhattingh
ID: 2543147
0
 

Author Comment

by:AMD_MAN
ID: 2558951

I ended up using MS-Word automation for now.  Thanks for sending me that way!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

963 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