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!

Fill Outlook user defined fields from Access 1

Status
Not open for further replies.

datawise

IS-IT--Management
Sep 14, 2001
27
EU
I have an app. which automatically creates outlook tasks and fills in the subject and body with appropriate text from the database. I have created two user defined fields in the tasks view in Outlook (Phone1, Phone2), and added them to the simple list view, but I cannot work out how to reference them from the code in Access which creates the new task.

Anyone done this before??

Thanks,

Peter
 
I think the user defined properties are in the UserProperties collection. Try something like:

Dim olItem As Outlook.TaskItem

Set olItem = CreateItem(olTaskItem)

olItem.UserProperties.Add "MyProp", olText

olItem.UserProperties(1).Value = "The Value"

With olItem.UserProperties(1)
MsgBox .Name
MsgBox .Value
End With

HTH

M :)
 
Thanks Mossoft - I hadn't added the userproperty - this works a treat!

Peter:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top