Solved

Creating A VB Form to View Multiple peoples Calendar

Posted on 2004-09-20
10
496 Views
Last Modified: 2009-09-08
Hi All,

I want to create a simple vb 6.0 form, which will allow me to view and edit several peoples outlook 2000 calendar's at once (4 people). lets say for example the users and mail server are as follows :-

Exchange server = mail2000
person1            =  Rich
Person2            =  Dave
Person3            =  Paul
Person 4           =  Bob

Anyone have any idea's please,
Cheers,
Ribuck
0
Comment
Question by:ribuck
  • 5
  • 2
10 Comments
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12101168
There are controls in VB called 'Microsoft Outlook Recipient Control' and 'Microsoft Outlook View Control'.  I've not used them, myself, but maybe they might allow you to at least query the mailboxes to some extent?
0
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12101315
In case you don't have the View Control, it can be downloaded, freely, from:  http://www.microsoft.com/downloads/details.aspx?FamilyId=831F957F-3190-48DA-A099-2BDBC7397623&displaylang=en

HTH
0
 

Author Comment

by:ribuck
ID: 12102944
Jimbibmcgee,

how do i use this control within VB ?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12110989
To actually use the control, you would first need to reference it.  I believe it is done by going to Tools/References (that might just be within VBA, though -- I have no VB6 testing area at the moment).  
The link I posted above points to a Microsoft help file that you can download and use as a reference guide for the control itself...
0
 
LVL 16

Accepted Solution

by:
jimbobmcgee earned 250 total points
ID: 12111426
I managed to get it working in VBA, it should be fairly similar in VB6.

Reference the Outlook View Control, with Tools -> References
Drag a View Control into a Form; size it and name it as required (default name ViewCtl1)
Set up some method of choosing the user to view; a listbox, textbox & submit button or series of commandbuttons, etc

Now, when a user is chosen execute the following line:
                            ViewCtl1.OpenSharedDefaultFolder user, foldertype

where user is a string containing the alias of the user
and foldertype is a vb/ol constant for the type of folder you are viewing

e.g.
                            ViewCtl1.OpenSharedDefaultFolder "joe.bloggs", olxFolderCalendar

will open joe.bloggs' calendar folder in the View Control.

You must have the rights to view the folders you want to see; check the Outlook help file for details on sharing the calendar file.

I guess if you want to see more than one calendar at a time, you could create more than one View Control, then call them as such:
                            ViewCtl1.OpenSharedDefaultFolder "user.1", olxFolderCalendar
                            ViewCtl2.OpenSharedDefaultFolder "user.2", olxFolderCalendar
                            ViewCtl3.OpenSharedDefaultFolder "user.3", olxFolderCalendar
                            ViewCtl4.OpenSharedDefaultFolder "user.4", olxFolderCalendar

as long as each calendar folder is shared and you do have read access to the folder.

Regards,
jimbobmcgee
0
 

Author Comment

by:ribuck
ID: 12121651
Think it must be Different in VB6 as references can only be in the format of *.olb, *.tlb or *.dll, and the file i downloaded was a .chm file, which i believe is purely just a help file.

Should it not be some sort of OCX or DLL file ?

Cheers,
Richard
0
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12121760
You are right, my mistake.  The link is to a help file on the usage of the control.  

If you have installed Office (2000/XP/2003) you should already have the Microsoft Outlook View Control -- it is called OUTLCTL.DLL and should be somewhere within the Office folder tree.  Once referenced in your project, its methods should be available to you.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now