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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal report printreport to excel from vba.

Status
Not open for further replies.

steve080233

Programmer
Sep 22, 2012
1
US
Is there anyway to get a printreport object to print to excel in VBA? The docs say the only options are pdf, html or rtf formats but I REALLY need excel. Can I use the information in the accpac Ui Info? The dialog is IC4120. When I do this manually and the printer destination is set to file, I can pick XLS 8.0 off of a list in an 'Export' dialog. I there anyway I can give that to the macro? If I just give the macro the PD_FILE setting, that same dialog comes up and I have to do it manually. It's basically this thing:

rpt.Destination = PD_FILE
rpt.Format = PF_PDF
rpt.PrintDir = "c:\temp\quote.pdf"
rpt.PrintReport

this will only take rpt.Format = PF_PDF or PF_RTF

This rpt.Destination = PD_FILE sill take PD_HTML.

There has got to be a way around this to make it do excel!!

thanks,
Steve
 
Since you're a programmer, add a reference to Excel in your project, and create your own Excel file, bypassing Crystal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top