Sender, SenderEmailAddress Missing in Folder.Items

前端 未结 1 1255
忘了有多久
忘了有多久 2021-01-23 02:52

I want to download attachments from Outlook emails.

Here is the code I am using to retrieve emails.

Set OutlookApp = New Outlook.Application
Set OutlookN         


        
1条回答
  •  -上瘾入骨i
    2021-01-23 03:24

    I had this issue as well. The only way I could get past it is by running the code IN OUTLOOK VBA (Outlook -> developer tab -> vba), and do not start your application specifically as an outlook application.

    example:

    Dim olApp As Outlook.Application
    Set olApp = CreateObject(Outlook.Application)
    

    would need to become

    Dim olApp As Application
    Set olApp = Application
    

    The trick is to NOT open a new instance of outlook from outside outlook (IE. in Excel). If you've got any type of Outlook Exchange security settings, opening outlook from excel will prohibit you from accessing key pieces of information such as sender.

    0 讨论(0)
提交回复
热议问题