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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding folders to outlook 2003 using .Net

Status
Not open for further replies.

redeemasp

Programmer
Jun 1, 2004
63
GB
Hi there

I'm trying to add folders into .Net, but failing everytime.

here is my code.

Dim objOutlook As New Outlook.Application
Dim objNS As Outlook._NameSpace = objOutlook.Session
Dim objTasks As Outlook.MAPIFolder = objNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
Dim objFolder As Outlook.MAPIFolder = _
objTasks.Folders.Add("Personal Tasks", Outlook.OlDefaultFolders.olFolderInbox)

I've copy interop.outlook and pasted it into the BIN folder and referenced it via the program.

Still it wont add the folder. Any ideas?

Lee
 
You might get better responses in the VB.NET forum:
forum796
 
Do you get any error messages? If so can you paste them in please as it may give a better idea whats going on
 
I get know error message. I compile and run, and I get a blank page, meaning its been run.

Why would the folder not be created?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top