I am attempting to send a Meeting Request from an Access 2003 
Database to a User utilizing Outlook 2003, with No Success.

It will send the Meeting to Me, as an Appointment, but nowhere else.
Following is the CODE I am utilizing, and assistance would be 
appreciated:

Private Sub cmd_SendAppt_Click()
On Error GoTo Add_Err
        
            'Save record first to be sure required fields are filled.
            DoCmd.RunCommand acCmdSaveRecord
        
            'Exit the procedure if appointment has been added to 
Outlook.
            If Me!AddedtoOutlook = True Then
                MsgBox "This appointment is already added to 
Microsoft Outlook"
                Exit Sub
            'Add a new appointment.
            Else
                Dim objOutlook As Outlook.Application
                Dim objAppt As Outlook.AppointmentItem
                Dim objRecurPattern As Outlook.RecurrencePattern
                Dim oRecipt As Outlook.Recipient
                Dim strRecipients As String
                
        
                Set objOutlook = CreateObject("Outlook.Application")
                Set objAppt = objOutlook.CreateItem
(olAppointmentItem)
                
                objAppt.MeetingStatus = 
Outlook.OlMeetingStatus.olMeeting
                
                strRecipients = "[EMAIL PROTECTED]"
        
                With objAppt
                    Set oRecipt = .Recipients.Add(strRecipients)
                    oRecipt.Type = olTo
                    .Start = Me!StartDate & " " & Me!StartTime
                    .Duration = Me!ApptLength
                    .Subject = Me!Client
                    
                    
                    
        
                    If Not IsNull(Me!Notes) Then .Body = Me!Notes
                    If Not IsNull(Me!ApptLocation) Then .Location = 
Me!ApptLocation
                    If Me!ApptReminder Then
                        .ReminderMinutesBeforeStart = Me!
ReminderMinutes
                        .ReminderSet = True
                    End If
        
                    Set objRecurPattern = .GetRecurrencePattern
                    
                    With objRecurPattern
                        .RecurrenceType = olRecursWeekly
                        .Interval = 1
                        'Once per week
                    '    .PatternStartDate = #12/19/2003#
                        .PatternStartDate = Me!StartDate
                        'You could get these values
                        'from new text boxes on the form.
                    '    .PatternEndDate = #7/23/2003#
                        .PatternEndDate = Me!EndDate
                    End With
        
                    .Save
                    .Close (olSave)
                    End With
                    'Release the AppointmentItem object variable.
                    Set objAppt = Nothing
            End If
        
            'Release the Outlook object variable.
            Set objOutlook = Nothing
        
            'Set the AddedToOutlook flag, save the record, display a 
message.
            Me!AddedtoOutlook = True
            DoCmd.RunCommand acCmdSaveRecord
            MsgBox "Appointment Added!"
        
            Exit Sub
        
Add_Err:
            MsgBox "Error " & Err.Number & vbCrLf & Err.Description
            Exit Sub

    
End Sub






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessVBACentral/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to