General discussion

Locked

Auto import database to outlook calendar

By CurtisAdmin ·
I am using Outlook 2003 SP2 and Access 2003 SP2. I would like to create a macro or button in Outlook that will import Service Call info from the Access database into the calendar. I already know how to run the Import using the menus and dialog boxes. I would just like to automate this with a button or key combo. I don't have any experience with Visual Basic. If there is a script I can download or copy, that would be most helpful. Thanks!

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by akritzer In reply to Auto import database to o ...

Ever find a solution to this???
email me!

Collapse -

by CurtisAdmin In reply to Auto import database to o ...

I do not have an answer yet. My e-mail is curtisadmin@illicom.net. Any help would be greatly appreciated.

Collapse -

Did you ever find an answer to this access export to outlook calendar?

by skelley In reply to

id you ever find an answer to this access export to outlook calendar?

Collapse -

What about a keyboard macro ?

by eric.goberman In reply to

I tried the samething and looked at what it would take in VB (with little VB experience) to figure this out.

I ended up using AUTOIT..

I create what ever appointment I want.. in the CSV format..

Outlook is usally open.. I point to the calendar

I run a 'macro' from autoit..and it does the keystrokes and nouseclicks in Outlook..just as one would do in EXCEL.

Download/install.. to completion of macro.. under 1 hour

Collapse -

Command to send form data to outlook calendar

by kmcnutt In reply to Auto import database to o ...

This should get you started. It will require you to use some VBA though.

This goes into a module.

Public Sub ToOutLookCalendar(ByVal Subject As String, ByVal EventStart As Date, ByVal EventEnd As Date)
On Error GoTo errTrap
Dim oApp As New Outlook.Application
Dim oCalendar As Outlook.MAPIFolder
Dim oNameSpace As Outlook.NameSpace
Set oNameSpace = oApp.GetNamespace("MAPI")
Set oCalendar = oNameSpace.GetDefaultFolder(olFolderCalendar)
With oCalendar.Items.Add(olAppointmentItem)
.AllDayEvent = True
.Subject = Subject
.Start = EventStart
.End = EventEnd
.ReminderSet = False
.Save
End With
Err_Exit:
Set oCalendar = Nothing
Set oNameSpace = Nothing
Set oApp = Nothing
Exit Sub
errTrap:
'Code to handle errors goes here
Resume Err_Exit
End Sub


Then this can go on your form:

Private Sub cmdOutlook_Click()
On Error GoTo errTrap
Dim oApp As New Outlook.Application
Dim oCalendar As Outlook.MAPIFolder
Dim oNameSpace As Outlook.NameSpace
Set oNameSpace = oApp.GetNamespace("MAPI")
Set oCalendar = oNameSpace.GetDefaultFolder(olFolderCalendar)
With oCalendar.Items.Add(olAppointmentItem)
.AllDayEvent = True

.Subject = Me.Summary ' Name of your field for the subject
.Start = Me.Begin ' name of your field for start time
.End = Me.End_Due_Date ' name of your field for start time
.ReminderSet = False
.Save
End With
Err_Exit:
Set oCalendar = Nothing
Set oNameSpace = Nothing
Set oApp = Nothing
Exit Sub
errTrap:
'Code to handle errors goes here
Resume Err_Exit
End Sub


Again this should get you started. There are other fields you can map, just search the help or google.

Oh, one last thing. Make sure you reference the Outlook Object Library under Tools;References in the VBA Editor. Just in case... You can bring up the VBA editor by pressing Alt+F11. Though if you didn't already know that, you probably won't want to mess with this.

Kevin

Collapse -

by nick.mosher In reply to Command to send form data ...

Kevin -
I appreciate your response. This was exactly what I was looking for. Now for a silly question. I'd like to map this to a different calendar in outlook other than the default. How would I change to code to do that?

Thanks, Nick

Collapse -

Command to send form data to outlook calendar

by acrich In reply to Command to send form data ...

I am trying to do the same thing, I try your code, unfortunly I dont see the information on th calendar. Beacause I have a french version of office I even tried the french version of the field but did not work either. In your is it working properly?

Thanks

I found a example on the Microsoft web site
http://www.microsoft.com/downloads/thankyou.aspx?familyId=78f8c61a-6b58-40**-92c8-8d727894c080&displayLang=en if it can help anyone

Alex

Alex

Back to Software Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums