HI All,
I am trying to collect mails from outlook public Folder. The macro is done in gathering mails fromm public folders. The concern is, during the mid way there is a popup comes as "MS Excel is waiting for another application to complete OLE action" with "OK" button.
Even after clik the OK button the excel hangs up for some time and the same popup comes back....
Durung this time when i try to access Outlook manually, i cannt.
the task manager shows my outlook is not responding.
belw is my code...
I am trying to collect mails from outlook public Folder. The macro is done in gathering mails fromm public folders. The concern is, during the mid way there is a popup comes as "MS Excel is waiting for another application to complete OLE action" with "OK" button.
Even after clik the OK button the excel hangs up for some time and the same popup comes back....
Durung this time when i try to access Outlook manually, i cannt.
the task manager shows my outlook is not responding.
belw is my code...
Code:
Set objFolders = oNS.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("BA").Folders("GSC2").Folders(Trim(Sheet1.Range("B3")))
If Not objFolders Is Nothing Then
Set itemNs = objFolders.Items.Restrict("[LastModificationTime] > '" & Date & "'") 'Find("[SenderName] = ""DOC TGT SOUTHCHINA""")
ii = 2
For Each itm In itemNs
Sheet1.Range("G" & ii) = itm.Subject
Sheet1.Range("F" & ii) = itm.SenderName
Sheet1.Range("H" & ii) = itm.ReceivedTime
Sheet1.Range("I" & ii) = CDate(Format(Now(), "dd-mm-yy ") & "12:00 AM")
Sheet1.Range("j" & ii) = itm.ReceivedTime >= CDate(Format(Now(), "dd-mm-yyyy ") & "12:00 AM")
ii = ii + 1
Next