https://www.devhut.net/2014/08/07/docmd-outputto-in-xlsx-excel-2007-format/ A common technique for exporting data to Excel is to utilize the DoCmd.OutputTo Method. Now, previously (pre Office 2007), the basic format to export a query to Excel format was simply: DoCmd.OutputTo acOutputQuery, "YourQueryName" , acFormatXLS, , True BUT, once you port such a database to a post Office 2007 computer, you start to get it exported as a “ Microsoft Excel 5.0/95 Workbook (*.xls) ” format and such a file will thus open Excel in compatibility mode possibly given the user compatibility errors/messages when they go to save the file after working with it. So unless you have to ensure legacy compatibility, it is strongly advisable to update your code to export the data in “ Excel Workbook (*.xlsx) ” format, the new Excel file format thus eliminating any compatibility issues. Hence, we simply need to change the OutputFormat format variable to a more appropriate f...
Comments
Post a Comment