GetExport().EmailFile() ?

TeeChart for ActiveX, COM and ASP
Post Reply
hansw
Newbie
Newbie
Posts: 59
Joined: Fri Nov 15, 2002 12:00 am

GetExport().EmailFile() ?

Post by hansw » Tue Dec 09, 2003 3:46 pm

What is needed to get EmailFile() to work ?

m_Chart1.GetExport().EmailFile("filename"); // send a file ?

m_Chart1.GetExport().EmailFile("email address"); // or email address ?

None of these work. I expect something else has to be done beofree EmailFile(0 will work.

Thanks

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Dec 09, 2003 5:44 pm

>m_Chart1.GetExport().EmailFile("filename"); // send a file ?
Yes, you must add the file name.

>What is needed to get EmailFile() to work ?
First you should export the Chart and then you will be able to send it via mail. You can do something like the following code (it works fine here) :

Code: Select all

void CEmailFileDlg::OnButton1() 
{	
	m_chart.GetExport().GetAsJPEG().SetCompressionQuality(90);
	m_chart.GetExport().GetAsJPEG().SetGrayScale(false);
	m_chart.GetExport().GetAsJPEG().SetHeight(400);
	m_chart.GetExport().GetAsJPEG().SetWidth(600);
	m_chart.GetExport().GetAsJPEG().SaveToFile("c:\\Chart1.jpg");
	m_chart.GetExport().EmailFile("c:\\Chart1.jpg");
}
Josep Lluis Jorge
http://support.steema.com

hansw
Newbie
Newbie
Posts: 59
Joined: Fri Nov 15, 2002 12:00 am

Post by hansw » Tue Dec 09, 2003 6:16 pm

works like a charm... thanks...

Post Reply