Click to See Complete Forum and Search --> : exporting form/query


Lorna
August 23rd, 2001, 04:30 AM
Hi

Iouri help me some time ago with this issue.
He advised me to add the following lines of code into my program:

DoCmd.SendObject acSendReport, "MyReport", acFormatXLS, "iboutchkine@hotmail.com", , , "Report send by e-mail", , false



This code seems to force MS exchange(via a Corel 8 settings dialog box) to try and send this report by mail. We are not using MS Exchange.

How can I send the report irrespective of which server we're using? (As I understand we're using a POP3 server - whatever that means....)

thanks!!

Iouri
August 23rd, 2001, 07:05 AM
This has nothing to do with Exchange. I don't have MS exchange on my computer. And we also have a POP3 server. This must work. Check on your e-mail client that MAPI server is enabled. You can find it in the e-mail program properties

Iouri Boutchkine
iouri@hotsheet.com

Lorna
August 23rd, 2001, 07:21 AM
(We're using Outlook express)

No such option as MAPI server enabled

Iouri
August 23rd, 2001, 07:28 AM
May be you can save your query to the file and then e-mail it using outlook.
Here the code how to send e-mail via outlook

add the Outlook Type library to the references of your project

Dim MyApp as Outlook.Application
Dim MyMailItem as Outlook.MailItem

set MyApp = new Outlook.Application
set MyMailItem = MyApp.CreateObject(olMailItem)
MyMailItem.Recipients.Add ("x@x.com") ' replace with a real address
'it can be '.To = "someone@microsoft.com"
MyMailItem.Subject = "Test" ' Subject field of the email
MyMailItem.Body = "This is just a Test!!!" ' main body of the email
'or for HTML report
'.HTMLBody = GetReport 'gets the report and puts into HTML
MyMailItem.CC = "y@y.com" ' replace with a real address
'.Importance = olImportanceNormal
MyMailItem.Send () ' send the message

'Close Outlook
Set MyApp = Nothing
Set MyMailItem = Nothing



'To send to recipients in thyour Address book
Recipients.Add "Joe Smith"), if "Joe Smith" is in your address book, & Outlook will find the right email address
for you.


Iouri Boutchkine
iouri@hotsheet.com