instantiate public folders

C

Chris Coho, Jr

Hi, I'm relatively new to outlook programming as I've had no real need for
it until now. What I need to do is make it so that my co-worker can save
all of her emails as .rtf emails. She's using outlook 2000. I found some
code at http://www.slipstick.com/dev/code/zaphtml.htm that allowed me to do
that for items in her inbox. The other place she needs to be able to do
this from, though, is a public folder called "email archive". I saw at the
bottom of th section on outlook 2000 CW where I got the code to take care of
her inbox items it gives instructions on how to set this up for other
folders. I have not been able to get it to work. I declared the item, and
i created the function that would do it, where i'm having problems is in
application_startup when i set the items collection = the folder.items, for
the inbox the code is Set olInboxItems =
objNS.GetDefaultFolder(olFolderInbox).Items, what code would i use to do the
same thing for my public folder?

Any help would be greately appreciated!

Thanks,
Chris Coho
(e-mail address removed)
 
S

Sue Mosher [MVP]

You can use the GetFolder() function from
http://www.slipstick.com/dev/code/getfolder.htm to return a MAPI folder
object based on a path string.

Note, however, that Outlook client event code isn't always the best approach
to a public folder programming situation. The ItemAdd event will fire and
run the code only when the Outlook client is running.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
C

Chris Coho, Jr

do you know of another solution? or is it possible to only run this when
she reads the messages (that way it only affects the messages it needs to)?
 
S

Sue Mosher [MVP]

You could use a server script or event sink to change the message class to
that of a custom form that contains the code you need to run. But make sure
form works before you go that route -- changing the format as a message is
opened could be tricky.
 
C

Chris Coho, Jr

hmm, well i appreciate your help. It sounds as though it may just be easier
to remove outlook 2000 and put outlook 97 on her machine to solve the
problem, up until this point i've never done any outlook programming and if
its a more advanced routine it probably isn't worth all the time it'll take
me to learn how to do it -vs- the time outlook 2000 saves her.

Thanks again for your help!
 
S

Sue Mosher [MVP]

The other thing I'd do is ask *why* she needs to save all messages as .rtf.
 

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