A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tasks--Export to MS Access



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 28th 06, 06:14 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Tasks--Export to MS Access

Am Thu, 27 Jul 2006 12:32:53 -0400 schrieb craigs:

This way you can open a connection to the db:

Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "D:\database.mdb"
.CursorLocation = adUseClient
.Mode = adModeShareDenyNone
.Open
End With

Example for a ref to the currently selected item:

Dim Task as Outlook.TasItem
Set Task=Application.ActiveExplorer.Selection(1)

You can use the Connections's Execute method to write one record into the
db:

Dim cmd$
cmd="insert into [table] (field1, field2) values (digit, 'string')"
cn.Execute cmd


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Hi --
Can someone show me a code snippet to export tasks(eg. Subject,
Complete,etc.) to MS Access. You can do this manually, but I would like to
do it automatically-since there is no macro recorder

Thanks

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmatically Export Outlook Mail to Microsoft Access LDMueller Outlook and VBA 4 June 13th 06 02:54 PM
Export Outlook 2003 Email Message To Access 2003 Table Gwhit Outlook and VBA 1 May 30th 06 04:36 PM
Backup your Outlook calendar, address book, notes, tasks...etc online, synchronize it across several locations, and get web access to all these data! [email protected] Outlook - Calandaring 1 April 14th 06 06:31 PM
Importing Tasks from Access on startup Grant Bush Outlook and VBA 7 March 10th 06 05:35 PM
Automating folder export from Outlook to Access [email protected] Outlook and VBA 1 March 6th 06 06:15 PM


All times are GMT +1. The time now is 05:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.