Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I import data to Outlook (2000) using VBA?

Status
Not open for further replies.

rickmasters

Technical User
Dec 17, 2001
3
0
0
GB
Hello,

I am trying to import data to Outlook from Access (2000). The import function in Outlook works fine, but I need to automate the whole process from a single button, so what code do I need to put behind that button?

I would really appreciate some help with this, many thanks.

 
You can import a file in a routine. This is a routine that I used. FolderName is a global variable with the path to the file.

Sub ImportData(CSV_file As String, Access_Table As String)

Dim DataFile As String
DataFile = FolderName + CSV_file

' Call MsgBox(DataFile, vbInformation, "Importing")
Call ClearImportFile(Access_Table)
DoCmd.TransferText , , Access_Table, DataFile, True

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top