Solved

Saving to DOC format

Posted on 2000-02-21
4
244 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 100 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to ask for filename column 8 37
Named range not carried over 10 63
Thin secure Windows 10 5 94
x-bar in Google Sheets 2 52
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

786 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