
|
View Full Version : Outlook programming
maknet 02-18-2009, 06:55 PM I'm more of a PHP programmer (so i have no idea how a GUI program works or .NET / VB programming).
I have a client that wants a web-based Calendar scheduling thing, but also wants it linked to Outlook.
Can anyone please tell me what options i have available exactly? (or even the keywords to look up?)
The way i figure, i think i can only export calendar stuff from outlook, and put it into this calendar thingy.
But any other slicker solutions would be appreciated.
If i knew how, i'm talking about:
1) auto update with the server
2) send scheduling requests to the server
3) server can send schedule / calendar requests to the users
Lawrence
cygnusd 02-19-2009, 01:37 PM Will the solution required be multi-user?
Is the scheduling thing you are referring to "calendar items" such as meetings, tasks, todo, free/busy time, etc?
If you, I think you should take a look at the iCalendar standard (RFC 2445).
maknet 02-19-2009, 01:48 PM Will the solution required be multi-user?
Is the scheduling thing you are referring to "calendar items" such as meetings, tasks, todo, free/busy time, etc?
If you, I think you should take a look at the iCalendar standard (RFC 2445).
It is basically a scheduling system, so that a supervisor can see the vacation-time blocked off by their staff.
Assuming i follow the iCalendar standard, does that mean that the staff / spuervisors can import it into their calendar? Or is that only when OUTLOOK exports and i can import into a web-based system?
Thanks!
Lawrence
sasha 02-19-2009, 03:04 PM search for "outlook ical"
I am not windows user so I am not sure how far outlook got, but any half decent calendaring system has built in ical support. That means that you should be able to "subscribe" to calendars which then would show up in your outlook. So each user, could subscribe to each other user's calendar and then they would all see what is going on. Obviously for this to work each user needs to be able to publish their own calendar so it is accessible to others. I am guessing that outlook might be providing this functionality through exchange server (ms's keep-it-in-family logic), but there might be some kind of option for automatic export / publishing too (if not, do search for "outlook publish ical", and you might find something).
In your implemtation you would end up with oulook publishing calendars to your web app, which then would provide option to it's users to subscribe to calendars. You could give them access to each calendar uploaded to it, or cooler, you would process uploaded calendars and give them access to calendars called "vacations" and similar. All in all, sounds like a fun and useful project.
fuel37 02-20-2009, 12:52 AM You can generate an iCal .ics file from within php (Check the web for the format or generate an ics file in outlook and mimic the format from there) and then subscribe to that calendar in outlook (Tools->Account Settings->Calendar). It's not overly difficult you just have to make sure you set your headers and whatnot properly.
Here's a bit of code I found on google doing a quick search (Should give you a pretty good idea on how to do it):
// database connection
include_once('db.php');
// Dates must be in the format YYYYMMDD
$events = $conn->execute("SELECT id, title, DATE_FORMAT(startDate,'%Y%m%d') AS start, DATE_FORMAT(DATE_ADD(endDate, INTERVAL 1 DAY),'%Y%m%d') AS end, startDate, endDate, description FROM calendar");
// Define the file as an iCalendar file
header("Content-Type: text/Calendar");
// Give the file a name and force download
header("Content-Disposition: inline; filename=calendar.ics");
// Header of ics file
echo "BEGIN:VCALENDAR\n";
echo "VERSION:2.0\n";
echo "PRODID:PHP\n";
echo "METHOD:REQUEST\n";
// Loop through database results and create an event for each item
while(!$events->EOF)
{
echo "BEGIN:VEVENT\n";
// The end date of an event is non-inclusive, so if the event is an all day event or one with no specific start and stop
// times, the end date would be the next day. This script is used with a calendar that does not deal with times, just dates,
// so the time for all events is set to 000000.
echo "DTSTART:".$events->fields[start]."T000000\n";
echo "DTEND:".$events->fields['end']."T000000\n";
// Only create Description field if there is a description
if(isset($events->fields[description]) && $events->fields[description] != '')
{
echo "DESCRIPTION:";
// Remove all linebreaks from description stored in database
$description = str_replace(chr(13).chr(10)," ", $events->fields[description]);
echo $description."\n";
}
echo "SUMMARY:{$events->fields[title]}\n";
echo "UID:{$events->fields[id]}\n";
echo "SEQUENCE:0\n";
echo "DTSTAMP:".date('Ymd').'T'.date('His')."\n";
echo "END:VEVENT\n";
$events->MoveNext();
}
echo "END:VCALENDAR\n";
|