Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Jun 20, 2019 11:24 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: using Outlook to access public Folder (contacts)
PostPosted: Tue Feb 15, 2011 6:19 am 
Offline

Joined: Thu Nov 08, 2007 4:59 am
Posts: 392
Location: Germany
Hello,

I'm looking for a way to access items (contacts) in a public folder (Exchangeserver2010) using Outlook2010.

I have the following VBA(?)/VBS Code that works when I run it from within Outlook :

Set CurFolder = Application.ActiveExplorer.CurrentFolder   //the (public) folder that is currently selected in Outlook

Set AllItems = CurFolder.Items
NumItems = CurFolder.Items.Count

' Loop through all of the items in the folder
For I = 1 to NumItems

Set CurItem = AllItems.Item(I)

' Test to see if the Message Class needs to be changed
If CurItem.MessageClass <> NewMC Then

' Change the Message Class
CurItem.MessageClass = NewMC

' Save the changed item
CurItem.Save

End If

Next


I guess it is possible to do this with OLE Automation?
I am as far as this :-) :

Dim objOutlook as OLEObject
objOutlook = New OLEObject("Outlook.Application", True)


Everything else that I add results in all kind of OLE Errors, even simple commands like this:
objOutlook.Value("Visible") = true
objOutlook.Visible = true


To get started I think that I'd need to know how to code

Set CurFolder = Application.ActiveExplorer.CurrentFolder

in RB.

Thanks,

Heinz


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group