Link to home
Start Free TrialLog in
Avatar of defrees
defrees

asked on

posting to a public folder

How do I take a post item that I've created and post it to a specific public folder?
Avatar of vmorales
vmorales

right click the item and choose move to folder, then select the public folder you want, if this is an outlook item.

If it is a word or excel, etc. item then choose from the file menu "sent to" then select folder.
Avatar of defrees

ASKER

Maybe I should be more specific.  I am writing a VB app that I would like to post items to a public folder.  I can create the item fine, but there doesn't seem to be any property to specify which public folder the item should be sent to.  And it defaults to the inbox.
Avatar of defrees

ASKER

Maybe I should be more specific.  I am writing a VB app that I would like to post items to a public folder.  I can create the item fine, but there doesn't seem to be any property to specify which public folder the item should be sent to.  And it defaults to the inbox.
Sorry, misunderstood.
I can't help you, but maybe someone else can.
Have you checked out:

Programming Examples for Referencing Items and Folders
http://support.microsoft.com/support/kb/articles/Q180/6/96.asp
I've created a form and the address of the mail is to a public folder. It very simple.
Get the email address for the public folder and put it on the To field, then when you post, it will go to that Public Folder.
The following fragment of VB code I'm using to create and move items to our KnowledgeBase which is situated in Public Folders/All Public Folders/KB folder

-----------------------------------------------
'declarations
Dim oApp As Outlook.Application
Dim oNS As Outlook.NameSpace
Dim oFolder As MAPIFolder
Dim oItem As Outlook.PostItem

Set oApp = CreateObject("Outlook.Application")
Set oNS = oApp.GetNamespace("MAPI")

Set oItem = oApp.CreateItem(olPostItem)
'Do something with item ....

'you should save before move
oItem.Save

'select destination folder here
Set oFolder = oNS.Folders("Public Folders").Folders("All Public Folders").Folders("KB")
'move item
oItem.Move oFolder
--------------------------------

Good luck,
Bodya    
Avatar of defrees

ASKER

Thank you for the answer Bodya!  I had already thought about that method as well as the one chewhoung offered.  However, there is a better way.  You can use the add method as follows:

Set NewPostItem = OLFolder.Items.Add(olPostItem)

Then you manipulate it like a normal post item.  I found this solution from the Microsoft Knowledge base that david_levine pointed me to.  Thanks David!
ASKER CERTIFIED SOLUTION
Avatar of david_levine
david_levine

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial