Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

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
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page