Hello,
I have a macro that used to work like charm on office 2010. Since the switch to windows 10 and office 365 it only work occasionally. The macro extracts excel files from e-mails that are in a certain sub folder. I am using the macro out of excel.
I used the following code:
Const olFolderInbox As Integer = 6
Sub DownloadAttachmentFirstUnreadEmailSharedMail()
Dim olNamespace As Object
Dim olApp As Object
Dim olNs As Object
Dim olFolder As Object
Dim olRecip As Object
Dim oOlItm As Object
Dim oOlAtch As Object
Set olApp = GetObject(, "Outlook.application")
Set olNs = olApp.GetNamespace("MAPI")
Set olRecip = olNs.CreateRecipient("work@work.de")
Set olFolder = olNs.GetSharedDefaultFolder(olRecip, olFolderInbox).Folders("03_EUR_03")
Unfortunately, the code gets stuck now in the last line giving me the error message "not all object could be found". However, this only happens occasionally.
I have a macro that used to work like charm on office 2010. Since the switch to windows 10 and office 365 it only work occasionally. The macro extracts excel files from e-mails that are in a certain sub folder. I am using the macro out of excel.
I used the following code:
Const olFolderInbox As Integer = 6
Sub DownloadAttachmentFirstUnreadEmailSharedMail()
Dim olNamespace As Object
Dim olApp As Object
Dim olNs As Object
Dim olFolder As Object
Dim olRecip As Object
Dim oOlItm As Object
Dim oOlAtch As Object
Set olApp = GetObject(, "Outlook.application")
Set olNs = olApp.GetNamespace("MAPI")
Set olRecip = olNs.CreateRecipient("work@work.de")
Set olFolder = olNs.GetSharedDefaultFolder(olRecip, olFolderInbox).Folders("03_EUR_03")
Unfortunately, the code gets stuck now in the last line giving me the error message "not all object could be found". However, this only happens occasionally.