Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant read my exported word document..

Status
Not open for further replies.

Norviking

Programmer
Nov 2, 2002
33
0
0
NO
Hi..

I'm having problem opening my exported word document.

Word comes up with a file conversion box. when i try to open it..

Hers my code..

fullpathname ="c:\\temp\\rammeavtale.doc";
rapporter.Rammeavtale1 ramme = new rapporter.Rammeavtale1();

CrystalDecisions.Shared.ExportOptions exportOpts = new CrystalDecisions.Shared.ExportOptions();
CrystalDecisions.Shared.DiskFileDestinationOptions diskOpts = new CrystalDecisions.Shared.DiskFileDestinationOptions();
CrystalDecisions.Shared.PdfRtfWordFormatOptions myformattypeoptions = new CrystalDecisions.Shared.PdfRtfWordFormatOptions();
exportOpts = ramme.ExportOptions;

// Set the export format.
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
exportOpts.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;

// Set the disk file options.
diskOpts.DiskFileName = fullpathname;
exportOpts.DestinationOptions = diskOpts;
exportOpts.FormatOptions = myformattypeoptions;

ramme.Export();

Can anyone plz tell me why my report cant be opened using word xp.

I'm making the report using crystal report designer and Visual.stuid.net C#.

plz help...
 
PortableDocFormat; is a PDF (Acrobat), not a Word document.

Word should open it, it'll just look kinda funny ;)

I think that it's:

ExportFormatType.WordForWindows

or you might try:

ExportFormatType.RichText

to produce an RTF

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top