Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    5

    Unanswered: Export the result table to excel automatically

    Is is possible to export all the result table to the Microsoft excel automatically after we run the macro (combination of queries) ?

    How to do it?

    Thank you

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Use the
    DoCmd.OutputTo TableName,
    TabelName2bExported, acFormatXLS, PathedExcelfileName2ExportYourData
    & ".xls"


    Just have a look to the OutputTo

  3. #3
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154

    Talking

    Greets,

    you can add it onto the macro you are running anyway.

    Click (as mentioned before) the Output to command,

    Select the object type, Table/Query

    Select the output type, html, rtf and (most importantly for you) xls, etc

    Enter the path for the output file, eg C:\documents and settings\me\my database\output reports\report1.xls

    You can then select for Excel to start once the macro has outputted the report/query to the xls format. Yes if you want the program to start, no if.. well you got the idea! ;0)

    Just add this into the macro that you are running anyway at the end, and one macro will take care of all your needs!!

    Dan
    sometimes simple is best.... and i'm just a simple fellow.

  4. #4
    Join Date
    May 2006
    Posts
    5
    problem solved

    Thanks guys

Posting Permissions

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