Forum Discussion
User Defined Fields In Outlook are not displaying in Power Query
- 1 year ago
I decided not to use Power Query.
Thank you for all your help.
This is a solution to pull out from Outlook User Defined fields including the subect and other fields within the email from and a folder in the Inbox named "test folder".
Team - I worked with a colleague this morning and he gave me a solution using VBA in Outlook.
I loaded this module into Outlook VBA.
Sub Test()
'On Error Resume Next
Dim objNS As Outlook.NameSpace: Set objNS = GetNamespace("MAPI")Dim olFolder As Outlook.MAPIFolder
'Set olFolder = objNS.GetDefaultFolder(olFolderInbox)
Dim Item As Object
Set olFolder = Application.Session.GetDefaultFolder(olFolderInbox).Folders("test folder")
For Each Item In olFolder.Items
Dim oMail As Outlook.MailItem: Set oMail = ItemIf oMail.UserProperties.Find("Action") Is Nothing Or _
oMail.UserProperties.Find("Risk") Is Nothing Or _
oMail.UserProperties.Find("Incident") Is Nothing Then
Debug.Print oMail.Subject & " | " & _
oMail.SenderName & " | " & _
oMail.ReceivedByName & " | " & _
oMail.CC & " | " & _
oMail.ReceivedTime
ElseDebug.Print oMail.Subject & " | " & _
oMail.SenderName & " | " & _
oMail.ReceivedByName & " | " & _
oMail.CC & " | " & _
oMail.ReceivedTime & " | " & _
oMail.UserProperties.Find("Action").Value & " | " & _
oMail.UserProperties.Find("Risk").Value & " | " & _
oMail.UserProperties.Find("Incident").ValueEnd If
Next
End Sub
Hi Amazon777 ,
Thanks for reaching out to the Microsoft Fabric Community forum.
It sounds like you're trying to access User Defined Fields (UDFs) from Outlook in Power Query, but they're not appearing as column choices. Here are a few steps you can try to resolve this :
- Ensure that the UDFs are properly set up and saved in your Outlook properties. Sometimes, UDFs need to be saved and refreshed in Outlook before they appear in Power Query.
- As a workaround, you can export your Outlook data, including UDFs, to an Excel file. Then, import the Excel file into Power Query2. This method ensures that all fields, including UDFs, are available for use.
You can export Outlook tasks to an Excel file and then import the Excel file into Power BI Desktop for analysis below are the links : How to extract or export tasks list to Excel in Outlook?
How to export Outlook task to Excel, CSV and Outlook Message (msg) - evo's smarter life
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
thank you - I am a fairly new to Power Query.
I appreciate the time you took to look at my issue.
I will check to see if this solution works for me.
Thanks,
Josh