Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access data into MS Outlook calendar

Status
Not open for further replies.

coxdon

Technical User
Mar 15, 2005
10
US
I'm using VBA code to transfer data from MS Access into our MS Outlook calendar. We are using Access and Outlook 2002 SP 3.

The code below works like a champ to loop through my Access query and put the data into the Outlook calendar. But the Outlook calendar allows you to color-code entries using the Label attribute. I can't figure out how to do this using the code. No matter what I try, VBA does not seem to recognize a label attribute. How can I use VBA to color-code my appointments?

The code I'm using is:
Code:
Do Until RM.EOF = True '(RM is my query)
  Set Xtasks = olFldr.Items.Add
       With Xtasks
        .Start = RM!Start
        .End = RM!End + 1
        .Subject = RM!Title
        .Body = "POC: " & RM!POC & " - " & RM!REMARKS
        .Location = RM!Location
        .Categories = "" & RM!IDN & ""
        .AllDayEvent = True
        .Save
        .Close (olSave)
        End With
    n = n + 1
RM.MoveNext
Loop

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top