Use the .exportoptions command to set the destination type, the format of the file and the name of the file. THen use .export to export the file. For example, the code below says for report1 I'm going to spool a file to the disk of format type Excel named "Test.xls". Now export it and don't prompt the user. It then does it again in rich text format.
With Report1
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.FormatType = crEFTExcel80
.ExportOptions.DiskFileName = "C:/Test.xls"
.Export (False)
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.FormatType = crEFTRichText
.ExportOptions.DiskFileName = "C:/Test.doc"
.Export (False)
End With
Hope this helps.
CrystalVisualBOracle