Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
notsosuper
Posting Yak Master
190 Posts |
Posted - 2005-09-01 : 12:50:36
|
I need some sort of loop that it won't only delete first item but all the items inside the folder. Please help, I am gone blank can't even write a loop hereSub Deleteall() Dim oapp As Outlook.Application Dim myNameSpace As Outlook.NameSpace Dim myFolder As Outlook.MAPIFolder oapp = CreateObject("Outlook.Application") myNameSpace = oapp.GetNamespace("MAPI") myFolder = myNameSpace.Folders("Public Folders").Folders("All Public Folders").Folders("Contacts") On Error GoTo ErrorHandler myFolder.Items(1).delete() Exit SubErrorHandler: MsgBox("There are no items to delete.") End Sub |
|
Kristen
Test
22859 Posts |
Posted - 2005-09-01 : 13:41:39
|
Don't know the first thing about this, but might you need something like:For iii = 1 to myFolder.Items.Count myFolder.Items(iii).delete()Next iii Kristen |
 |
|
Xerxes
Aged Yak Warrior
666 Posts |
Posted - 2005-09-01 : 14:35:25
|
Is he asking for a cursor?Semper fi, XERXES, USMC(Ret.)------------------------------------------------------The Marine Corps taught me everything but SQL! |
 |
|
Kristen
Test
22859 Posts |
Posted - 2005-09-01 : 15:21:19
|
Can't be. Questions about Cursors aren't allowed on SQL Team Kristen |
 |
|
Xerxes
Aged Yak Warrior
666 Posts |
Posted - 2005-09-01 : 15:30:36
|
Kristen.....you are just TOO COOL! Semper fi, XERXES, USMC(Ret.)------------------------------------------------------The Marine Corps taught me everything but SQL! |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-02 : 01:46:15
|
>>Is he asking for a cursor?Cursors in Client side MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|