ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Fetching user-defined fields from Outlook (https://www.excelbanter.com/excel-programming/339892-fetching-user-defined-fields-outlook.html)

Marcus Langell

Fetching user-defined fields from Outlook
 
Hi!
I am fetching tasks from Outlook and it works well for the Outlook-defined
columns like Subject, DueDate etc. but I don't know how to get my
user-defined columns. Any ideas? Se example below

/Marcus

Set olApp = New Outlook.Application
Set olNamespace = olApp.GetNamespace("MAPI")
Set olFolder = olNamespace.GetDefaultFolder(olFolderTasks)
Set olColItems = olFolder.Items

For Each olItem In olColItems
If TypeName(olItem) = "TaskItem" Then
With olItem
Cells(i, 1).Value = .Subject
Cells(i, 2).Value = .Categories
Cells(i, 3).Value = .StartDate
Cells(i, 4).Value = .Prio 'this does not work since it's not
recognized

Next olItem
End If



All times are GMT +1. The time now is 06:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com