![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I'd really appreciate some help with this... I'm wanting to write a new TASK to Outlook-2003 from a form in Access-2003. Have tried both Early and Late binding... (see dims) Code crashes (Runtime error 91) at line marked "error" (see below.) whether Outlook is running or not... Any suggestions greatly appreciated. Many thanks David ================================================== ==== Private Sub cmdCreateTask_Click() On Error GoTo Err_cmdCreateTask_Click Dim objOL As Outlook.Application 'Early Binding Dim myItem As Outlook.TaskItem 'Early Binding Dim objSafeTaskItem As Object 'Early Binding Dim myNS As Outlook.NameSpace 'Early Binding 'Dim objOL As Object 'Late Binding 'Dim myItem As Object 'Late Binding 'Dim objSafeTaskItem As Object 'Late Binding 'Dim myNS As Object 'Late Binding Dim blnOlRunning As Boolean Dim timeX As String Dim strVia As String Dim strReg As String 'Save the local Access record. Me.Refresh 'Check if Outlook is already running by 'looking for an error when opening On Error Resume Next Set objOL = GetObject(, "Outlook.Application") 'If outlook is NOT running, then If Err.Number = 429 Then Err.Clear 'open an instance of Outlook Set objOL = CreateObject("Outlook.application") End If 'Reset error trap On Error GoTo 0 Set myNS = objOL.GetNamespace("MAPI") 'error myNS.Logon ' If there is a date set If Len(Me!ChaseDateCalendar & "") 0 Then 'Set alert time timeX = "09:00:00" strVia = Trim(Me![cmbContactBy]) & "" (code continues.... snipped for brevity...) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a link to an e-mail in a task | [email protected] | Outlook and VBA | 1 | November 14th 06 06:03 AM |
Creating an Outlook Task Add-in Solution using AdvancedSearch in C | Tom_in_Atlanta | Add-ins for Outlook | 2 | September 12th 06 02:14 AM |
Help with Code - Creating Status Report from Task items | Steve | Outlook and VBA | 1 | August 2nd 06 05:45 AM |
Creating Task sometimes collapses group | T. Wise | Outlook - General Queries | 3 | July 14th 06 04:46 AM |
Adding an Outlook task from Access | Blogd_Node | Outlook and VBA | 6 | June 7th 06 04:33 PM |