Hi Obelix,
> ...error saying object variable not set. Can anyone
> guide me on what should i set for oMessage?
Try this:
For lIter = oFldr.Count To 1 Step -1
oFldr.Item(lIter).Delete
Next lIter
And a warning. BEFORE you run code of any nature that can potentially
screw up your Outlook PST file contents - either back it up (close
outlook and duplicate the PST file) or export the contents to an
external file.
A couple days ago I made a big boo-boo running some code in which I
had coded a comparison incorrectly ("<>" instead of "="). It
effectively renamed all of my contacts in my root contact folder to ",
[]" - which was rather annoying. Fortunately, most of my important
contacts are under subfolders of that folder.
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
'// ========================================================
"Keep away from people who try to belittle your
ambitions. Small people always do that, but the really
great make you feel that you, too, can become great."
-- Mark Twain
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~->
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [EMAIL PROTECTED]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/