Friday, February 5, 2016

Access VBA Methods to export your Table, Query, Form, Report data

'Access VBA methods to export the data

'*******************You can export the data from a table , query********************

'acSpreadsheetTypeExcel12Xml for xlsx file
'acSpreadsheetTypeExcel12 for xlsb format
'acSpreadsheetTypeExcel9 for xls format

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "qRY_Final", "Destination file path"


'*****************************************************************************
'Below method will allow to export the table, form, report, query data into (Excel,txt,pdf) formats
'acFormatXLS
'acFormatTXT
'acFormatPDF
'acFormatRTF
DoCmd.OutputTo acOutputForm, "frm", acFormatTXT, "Destination file path & filename & fileextenstion"

'change the acOutput type as per your choice to select access object type
'acOutputTable
'acOutputForm
'acOutputReport
'acOutputQuery

1 comment:

  1. 11bet | Livebet | Livebet Casino Online Betting Platform
    ‎Livebet.com betway · ‎Livebet Casino Online Betting Platform · ‎Livebet Casino Online Betting Platform · ‎Livebet Casino Online Betting Platform 188bet · ‎Livebet Casino 11bet Online Betting Platform

    ReplyDelete

Excel VBA to send email from excel with HTML table in a email body

'' Excel vba script to send email from outlook & email body in HTML table format. ''Write down email body in HTML tags...