Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 23rd, 2003, 03:19 AM
Authorized User
Join Date: Jul 2003
Location: Stockton on Tees, , United Kingdom.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using Outlook Calendar in Access

Hi Guys/Gals, I know you can help on this one.
I want to use the Outlook Calendar system from within Access 2002. I would use VBA to create reminders in Calendar and then let Outlook do the reminding/follow up. I've tried a linked table to the Calendar folder but the fields displayed are very limited.
Rather than re-inventing the wheel, can someone point me towards a understandable description of the Appointment Object model and what properties to use in this case.
Thanks in advance.

Cheers Ray
Cheers Ray
Reply With Quote
  #2 (permalink)  
Old October 24th, 2003, 11:33 AM
Authorized User
Join Date: Jun 2003
Location: Memphis, TN, USA.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts

Ray use this....
Private Sub cmdReminder_Click()
On Error GoTo Err_cmdReminder_Click

    Const conerr = 94
    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim strSubject As String
    Dim strBody As String
    Dim strDueDate As String
    Dim strCusName As String

    strCusName = DLookup("[CompanyName]", "[Customers]", "[CustomerID]=CustomerID")

    strSubject = "Help Desk Ticket: '" & Me.ServiceRecordID & "' (for - " & strCusName & ")"

    If Not IsNull(Me.ProblemDescription) Then
        strBody = Me.ProblemDescription
        MsgBox "You need to Enter a Problem Description", vbCritical, "Missing Info"
        Exit Sub
    End If

    If Not IsNull(Me.FollowUpDate) Then
        strDueDate = Me.FollowUpDate
        MsgBox "You need to Enter A Follow-Up Date", vbCritical, "Missing Info"
        Exit Sub
    End If

    If Not IsNull(strSubject) Then
        ap_CreateOLTask strSubject, strBody, strDueDate
        MsgBox "You Need To Enter All Information!", vbCritical, "Missing Information"
    End If

    Exit Sub

    If Err = conerr Then
        MsgBox "You are Missing Information", vbCritical, "Missing Information"
        Exit Sub
        MsgBox Err.Description
        Exit Sub
    End If

End Sub

Public olkApp As Outlook.Application
Public olkNameSpace As Outlook.NameSpace

Public Sub ap_CreateOLTask(strSubject As String, strBody As String, _
                            strDueDate As String)

    Dim objTaskItem As TaskItem

    Set olkApp = New Outlook.Application
    Set olkNameSpace = olkApp.GetNamespace("MAPI")
    Set objTaskItem = olkApp.CreateItem(olTaskItem)

    With objTaskItem
        .Subject = strSubject
        .DueDate = strDueDate
        .Status = olTaskInProgress
        .ReminderSet = True
        .ReminderTime = (strDueDate) & " " & CDate(#9:00:00 AM#)
        .Categories = "Task From Access"
        .Body = strBody
    End With

    Set objTaskItem = Nothing
    Set olkNameSpace = Nothing
    Set olkApp = Nothing

End Sub

Reply With Quote
  #3 (permalink)  
Old October 27th, 2003, 04:44 AM
Authorized User
Join Date: Jul 2003
Location: Stockton on Tees, , United Kingdom.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks I'll give it a try

Cheers Ray
Reply With Quote

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Outlook Calendar in/thru Visual Basic mjai VB Components 1 August 20th, 2008 02:57 PM
Outlook Calendar (in VB) seananderson VB Components 2 September 28th, 2007 05:22 AM
Send MS Outlook Calendar Entry From ASP.NET wackoyacky ASP.NET 2.0 Basics 0 June 17th, 2007 10:02 AM
outlook calendar on web page Seeker55 Javascript How-To 0 March 28th, 2006 03:30 PM
Outlook calendar Selected Dates? avinashgavali Access 0 January 24th, 2005 01:42 AM

All times are GMT -4. The time now is 09:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.