473,779 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reference Exchange Public Folder in vb.net

I have some vb.net code that goes and gets some information from our
Contacts Public folder named "Pierce Contacts". As you see from the code
below, i reference this folder by first navigating to the folder in outlook.
Is there any way to reference the public folder programatically .
The exchange public folder is under
"Public Folders"
"All Public Folders"
"Pierce Contacts"

Sample code:
ol = New outlook.Applica tion
olns = ol.getnamespace ("MAPI")
***-> olFolder = ol.activeexplor er.currentfolde r <-****** 'currentfolder'
CurFolder = olFolder.name
AllItems = olFolder.items
NumItems = AllItems.count
For Each Itm In AllItems
'do some stuff here
Next
Nov 21 '05 #1
1 6192
To get a non-default folder, you need to walk the folder hierarchy using the Folders collections, starting with Namespace.Folde rs, or use a function that does that for you. See http://www.outlookcode.com/d/code/getfolder.htm for a VB example that should give you the basic idea.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Chris Thunell" <ct******@pierc eassociates.com > wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I have some vb.net code that goes and gets some information from our
Contacts Public folder named "Pierce Contacts". As you see from the code
below, i reference this folder by first navigating to the folder in outlook.
Is there any way to reference the public folder programatically .
The exchange public folder is under
"Public Folders"
"All Public Folders"
"Pierce Contacts"

Sample code:
ol = New outlook.Applica tion
olns = ol.getnamespace ("MAPI")
***-> olFolder = ol.activeexplor er.currentfolde r <-****** 'currentfolder'
CurFolder = olFolder.name
AllItems = olFolder.items
NumItems = AllItems.count


For Each Itm In AllItems
'do some stuff here
Next

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2405
by: Patrick | last post by:
I'm trying to create a link from Access 2003 to an Exchange 2000 Public Folder called "WMContacts" I choose File => Get External Data=> Link Tables. I choose Exchange() and the wizard give me the Link Exchange/Outlook Wizard. From there I choose Public Folders => All Public Folders => WMContacts. I leave the linked table name as "WMContacts". It then displays a nastygram with the following: "The MAPI store "WMContacts" is known but is...
1
2529
by: Kim Nørby Andersen | last post by:
I'm in a situation, where i'm supposed to develop a windows service, connecting to an external source, and insert new contact persons to an Exchange public folder. Everything is going well, until I actually had to access the Exchange folder. First I tried interop'ing with Outlook, managing to create a contact in my default contact folder, and then moving it to the specified public folder (workaround). That puts up some problems...
3
4022
by: maria.s | last post by:
Hi, I try to create a calender-item in the personal calendar folder from an ASP.NET application using XML-HTTP Request (WebDAV). System: Windows 2003 SP1, Exchange 2003 SP1 Configuration IIS: Default Web Site stopped, OWA running on a second virtual site, my application is running on a third virtual site.
3
3345
by: Krach | last post by:
Hi everybody! I'm decided to develop (at least try) a custom pop3 connector / mail downloader for Exchange 2003. The question is simple: How do I start? I use MS Visual Studio 2003 (VB .Net). I want to build an app which first retrieves all mail from our ISP and then delivers it to every Exchange inbox folder in the company. So I guess I need first to build a pop3 client and then manage to reroute those messages to the Exchange inbox...
2
4478
by: Andy | last post by:
Hi, I'm trying to get a users free/busy status from exchange from within a website and using the code below, but when I run this a login page from MS Outlook Web Access is retrieved from the server rather than a XML file containing the users free/busy status for the specified time period. I've spent all day looking for solutions to this but I'm stumped. I have been looking for an Exchange newsgroup but there doesn't seam to be one,...
7
5138
by: Don | last post by:
Getting errors after following the MSDN article on using VB.NET (and VS2005) for "Implementing a Managed OnSave Event Sink" for Exchange Server 2007. Not sure, but part of the problem may be that it's the 64-bit version of Exchange 2007 installed on Windows Server 2003 Enterprise x64, while the Exchange 2007 SDK samples seem mostly geared toward 32-bit. Even at that, I was able to build the TLB and install it into COM+ Component Services,...
0
3612
by: rnaimon | last post by:
I found the following information on this site, but I am unable to get it to work. All it brings back is the xml page with no data. I am running a Windows 2003 Server with Exchange 2003 Server. When the code gets to This line.. If objDoc.loadXml(objRequest.ResponseText) Then The results return False and I don't receive any data. Does anyone know what the problem may be? Re: ASP: Exchange 2003 Free/Busy Lookup ...
0
3401
by: arjen1984 | last post by:
I am now working on C# with WebDAV on Exchange now to get appointments. When I work local on the domain where the server is, i can get the appointments no problem. When I work outside of it, i get an SecurityException. This is my code to get the appointments: protected void getAfspraken() { NetworkCredential credential = new NetworkCredential("bhees","1234567", "oaicttest"); WebdavSession session = new...
5
3573
by: krasman | last post by:
hi everyone, i hope you might help me on this one. i need to create a contact in a exchange public folder using dotnet (vb or c#) and exchange 2003, without using outlook object model. i'm searching for a few hours and can't find a clear example on how to do it. i've already seen code blocks using webdav, directory services, but always related with creating active directory users or mail enabling users, not exactly what i'm looking for....
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.