CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    195

    exporting form/query

    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, "[email protected]", , , "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!!


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: exporting form/query

    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
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    195

    Re: exporting form/query

    (We're using Outlook express)

    No such option as MAPI server enabled


  4. #4
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: exporting form/query

    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 ("[email protected]") ' replace with a real address
    'it can be '.To = "[email protected]"
    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 = "[email protected]" ' 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
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured