bwcc Posted March 5, 2007 Share Posted March 5, 2007 I've been asked to look at developing a web-based system for tracking forms. In itself, it is fairly simple. However, one item they want to look at is Outlook integration for tasks. We use an internal exchange server and I have read about being able to use COM objects to write tasks for Outlook from PHP. However, I'm having difficulty with this part. The script I do have is timing out and documentation on using COM objects is fairly sparse. Should I be looking at something other than PHP? Any insight would be appreciated. The script I do have is below. /* Define Outlook number for Task Item */ $olTaskItem = 3; /* Create an instance of Outlook */ $ol = new COM("Outlook.Application"); /* Create a Task Item */ $task = $ol->CreateItem($olTaskItem); /* Set dates for current week. */ $begin = date("m/d/y", strtotime("last Sunday")); $end = date("m/d/y", strtotime("this Saturday")); $due = date("m/d/y", strtotime("this Friday")); /* Set some properties of the task */ $task->Subject = "Notes for $begin to $end"; $task->DueDate = $due; $task->Body = "Insert the template text for your task"; /* Save the Task */ $task->Save(); print("Done"); Link to comment https://forums.phpfreaks.com/topic/41299-using-com-objects-or-importing-to-outlook/ Share on other sites More sharing options...
trq Posted March 5, 2007 Share Posted March 5, 2007 Make sure you have error handling on is all I can really say. The code looks fine. COM is the same in any language so it doesn't really matter if you use PHP or any other COM enabled language. Link to comment https://forums.phpfreaks.com/topic/41299-using-com-objects-or-importing-to-outlook/#findComment-200109 Share on other sites More sharing options...
bwcc Posted April 5, 2007 Author Share Posted April 5, 2007 Ah - yes, I do have that restricted. This part has been back-burnered right now, but I'll remember to do that. Thanks! Link to comment https://forums.phpfreaks.com/topic/41299-using-com-objects-or-importing-to-outlook/#findComment-222150 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.