Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2002
    Location
    London
    Posts
    73

    Unanswered: Export from Access 2007 to Excel 2007

    Hi i have just upgraded from Access 2000 to Acces 2007. I am using my vba script to export data but for some reason it does not like Access query exporting into excel.

    Below is my code


    DoCmd.OutputTo acOutputQuery, "qryCustomerSalesAndStockOfferExport", acFormatXLS, "c:\StockOfferLog\CustomerStockSalesAndOffer.x ls", False

    Can anyone please help me as i am stuck

    Thank toy for your help

  2. #2
    Join Date
    Jan 2002
    Location
    London
    Posts
    73
    I figured it out, it should be

    DoCmd.OutputTo acQuery, "qryCustomerSalesAndStockOfferExport", "MicrosoftExcel(*.xls)", "c:\StockOfferLog\CustomerStockSalesAndOffer.x ls", False, ""

  3. #3
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    Excel 2007 format file extension is xlsx - change this and it should work.

    DoCmd.OutputTo acOutputQuery, "qryCustomerSalesAndStockOfferExport", acFormatXLS, "c:\StockOfferLog\CustomerStockSalesAndOffer.xlsx" , False
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  4. #4
    Join Date
    Nov 2015
    Posts
    1

    Need upgrade Office2007 SP2

    Quote Originally Posted by Hemish View Post
    Hi i have just upgraded from Access 2000 to Acces 2007. I am using my vba script to export data but for some reason it does not like Access query exporting into excel.
    DoCmd.OutputTo acOutputQuery, "qryCustomerSalesAndStockOfferExport", acFormatXLS, "c:\StockOfferLog\CustomerStockSalesAndOffer.x ls", False
    Can anyone please help me as i am stuck
    It is not a problem.
    I also feel this problem, and I know the solution: you must upgrade your Office2007 with Service Pack 2.
    Refer that site
    https://support.microsoft.com/en-us/kb/934833

Posting Permissions

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