Skip to Content
author's profile photo Former Member
Former Member

Export to doc format . But it is actually rtf.

I am using CR in Win XP SP3 for a .net 2.0 win form application.

I am trying to export report to doc format from the code.

Problem : when I export and save the report , report is saved as .doc format. But when I open the report in office 2003, it is shows the status as ''Converting file " (in bottom status bar) for first few seconds and opens the file. In some machine , it even shows a dialog "Convert from" in which rtf is selected . You have to click 'Ok' on this dialog to open the file. So I assume that file is not saved as .doc format when I export using API. It is saved rtf. How to save the file as .doc rather than .rtf renamed as .doc file ?

My code :

PdfRtfWordFormatOptions wordOpts = new PdfRtfWordFormatOptions();

expOpts = lobjRpt.ExportOptions;

lobjRpt.ExportOptions.ExportFormatType = ExportFormatType.WordForWindows;

expOpts.ExportFormatType = ExportFormatType.WordForWindows;

exptOpts.FormatOptions = wordOpts;

expOpts.ExportDestinationType = ExportDestinationType.DiskFile;

diskOpts.DiskFileName = lstrFileName;//this will have extension .doc and full file name

exportOpts.DestinationOptions = diskOpts;


Any pointers to solve this issue is appreciated.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Sep 09, 2010 at 04:03 PM


    It's always been this way. As long as I can remember ( CR 5 ) the Word Doc and RTF export types where identical. It's always been a RTF format. In CR 8.5 the RTC and DOC export dll's were identical except the file was saved with their respective extensions.

    RTF is an easier format to use and less Word version specific so it's more generic when exporting, any version of Word can open RTF files.

    I have not tested this in a long time but try renaming the file to *.doc and see if Word can open it up.

    Otherwise your only option is to save it to DOC format once opened in Word. There may be WORD API's available that would allow you to export the RTF to word using Windows Office API's in your application.

    You never said what the issue is other than having to click the OK button once the file is opened in Word? Is this the only issue?

    Thank you


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.