Error accessing Outlook folder

J

John

Hi

I am trying to access the Draft folder using the following vb.net code;

Dim objOutlook As Object = CreateObject("Outlook.Application")
Dim oNS As Object = objOutlook.GetNamespace("MAPI")
Dim oFld As Object = objOutlook.Folder

oFld = oNS.GetDefaultFolder(olfolderDrafts)

Problem is I am getting a "Public member 'Folder' on type 'ApplicationClass'
not found." error on the line Dim oFld As Object = objOutlook.Folder. What
is the issue and how can I fix it?

Thanks

Regards
 
M

Michael Bauer [MVP - Outlook]

I assume this should work:
Dim oFld As Object = oNS.GetDefaultFolder(olfolderDrafts)

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Fri, 26 Dec 2008 05:37:57 -0000 schrieb John:
 

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