Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Using SendObject...please help if possible...

Discussion in 'Information Technology' started by ac512, Jul 28, 2006.

  1. ac512

    ac512
    Expand Collapse
    Guest

    Hello

    I am using Access 2002, and have a query which looks at sales volumes for
    this year, and also the same period last year (basically a simple table which
    has 3 columns: month, Sales for this year, & Sales for last year). I am
    trying to use the SendObject action to send this query in Excel format, but I
    also need to provide a chart of the results. Is there any way that I am able
    to somehow incorporate a chart of this query so that the recipient can
    receive the chart in Excel as well?
    I am hoping that someone can help, or provide any suggestions which will help

    Thanking you in advance
    AC
     
  2. Loading...


  3. Tom Wickerath

    Tom Wickerath
    Expand Collapse
    Guest

    Hi AC,

    SendObject is used for sending an object (table, query, form, report, etc.)
    in the database in the specified format. I believe you will need to use code
    to automate Excel instead. A general outline of the steps involved include
    the following, all of which you should be able to do with VBA code:

    1.) Open a pre-defined template file (*.XLT), which includes your formatted
    chart.

    2.) Push data into a worksheet (use a named range?).

    3.) Use automation code to set the limits of the data for the chart.

    4.) Save the results to a named .XLS file in a known folder.

    5.) Use Outlook (Outlook Express will not work) to create a new e-mail
    message, with the To:, Cc:, Subject, and Body prefilled if you wish. Include
    your saved .XLS file as an attachment.

    I've only provided a general outline, because I do not have a canned example
    ready to provide. However, here is a link where you can download a compiled
    Help file on Automation, which should get you started:
    http://support.microsoft.com/?kbid=302460

    and here is a link for creating a message in Outlook and attaching a file:
    http://www.microsoft.com/office/com...cess&mid=a6cff88e-6897-46bb-b112-2d7014c31602


    Good Luck,

    Tom Wickerath
    Microsoft Access MVP

    http://www.access.qbuilt.com/html/expert_contributors.html
    http://www.access.qbuilt.com/html/search.html
    __________________________________________

    "ac512" wrote:

    > Hello
    >
    > I am using Access 2002, and have a query which looks at sales volumes for
    > this year, and also the same period last year (basically a simple table which
    > has 3 columns: month, Sales for this year, & Sales for last year). I am
    > trying to use the SendObject action to send this query in Excel format, but I
    > also need to provide a chart of the results. Is there any way that I am able
    > to somehow incorporate a chart of this query so that the recipient can
    > receive the chart in Excel as well?
    > I am hoping that someone can help, or provide any suggestions which will help
    >
    > Thanking you in advance
    > AC
     

Share This Page