Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Export to Excel from VBScript - How to hide Export option window

Hi all, I have a problem. I need to export report to excel in background using VBScript but it always brings export option window (not that one where you select format etc but next one). What to do to hide this window?

Set objCRApp = CreateObject("CrystalRunTime.Application")
set objCRRpt = objCRApp.openreport( rptfile )
objCRRpt.ParameterFields(1).SetCurrentValue  CDbl(rep_week)
        
With objCRRpt
    With .exportoptions
        .formattype = 29
        .ExcelExportAllPages = true
        .diskfilename = exportfile
        .destinationtype = 1
        .UseReportDateFormat = True
        .UseReportNumberFormat = True
    End With
    .export(False)
    RetValue = exportfile
End With

Thanks!

Edited by: Vitaliy Kochubiy on Oct 14, 2008 11:26 PM

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question