NEWBIE ( select the same folder )

M

miro

Hi!

This code mark unread the picked up folder messages. It works correctly.
But how can I mark unread always a specific folder (ex. "fax")?

Thanks in advance
M.

-----
Dim olApp As Outlook.Application
Dim olSession As Outlook.NameSpace
Dim olStartFolder As Outlook.MAPIFolder
Dim strPrompt As String

Set olApp = Application
Set olSession = olApp.GetNamespace("MAPI")

' **** HERE I WANT SELECT ALWAYS THE FOLDER NAMED "fax"
Set olStartFolder = olSession.PickFolder


For Each objItem In olStartFolder.Items
objItem.UnRead = False
objItem.Save
Next
------
 
S

Sue Mosher [MVP-Outlook]

M

miro

Thanks SM!


Sue Mosher said:
To get a non-default folder, you need to walk the folder hierarchy using
the Folders collections or use a function that does that for you. See
http://www.outlookcode.com/d/code/getfolder.htm

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba


--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top