Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Public Folders in Outlook

Status
Not open for further replies.

FatherJack

Programmer
Aug 29, 2000
19
0
0
GB
Can anyone tell me how to reference a public folder from an outlook process? so far i have:

Set myNameSpace = GetNamespace("MAPI")
Set mySourceFolder = myNameSpace.Folders(mySource)

where the namespace find the personal folders and mysource is a string variable containing the name of the folder i want to open. How do i get the getnamespace to see the public fodlers?

please for the sake of my sanity help me

cheers
 
Here you go. I did something similar, but not exactly what you would like. I used this script to open a form from personal or organization forms library...Something like this should get you going though:


Function Item_Open()

Set MyNameSpace = Application.GetNameSpace("MAPI")
Set PublicFolders = MyNameSpace.Folders("Public Folders")
Set AllPublicFolders = PublicFolders.Folders("All Public Folders")
Set MyFolder = AllPublicFolders.Folders("folder1name")
Set SubFolder = MyFolder.Folders("folder2name")
Set MyItems = SubFolder.Items
Set MyItem = MyItems.Add("IPM.Post.formname")

MyItem.Display
End Function mailto:troy_underwood@owfg.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top