A lot has been talked about the fascinating features of Content Editor Web Part (CEWP) in MOSS 2007. Have you thought about its features like get your java script added on the share point page and do whatever you like (if attainable in java script!!) or have your mind horses galloped to the field to get your Outlook configured on the web page with a blazingly accountable performance. I have said this because already there are OOB web parts available to drag items from you Outlook account and get them stitched on your web page. But going that way may be too much costly in terms of performance (the most important thing for you clients..!!. No doubt every lacking thing from your side is on priority of client’s wish list!!).
So cutting the crap now and coming to the point: Using java script to yank the items from your Outlook account and get them travel to your web page is as simple as reading this blog. So for your convenience (prime concern for this blog owner), I have summarized the steps as below:
· Add a new web part page in your share point site, say Outlook.aspx.
· Edit the page and add a CEWP on to that.
· Edit the CEWP using the Edità Modify this web part sort of thing.
· Open the Source Editor window by bashing the “Source Editor…“ guy there.
· Okay the billion dollar point, Add the below code in the window and Save.
· Now close your eyes and count to 3…!!! .< language="javascript" type="text/javascript">
function getNewEmail() {
try {
o = new
ActiveXObject("Outlook.Application");if(o) {
mailFolder =
o.getNameSpace("MAPI").getDefaultFolder(6);//You could also use custom forms like
//IPM.Note.CustomFormmailItem = mailFolder.Items.add("IPM.Note");
mailItem.Display(0);}
}
catch(e) {
window.status = e.Message;
}
}
< /script>
< type="button" title="Send new email" value="New" onclick="javascript:getNewEmail();">
< classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%"> < name="Folder" value="Inbox"> < /OBJECT>
< classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%"> < name="Folder" value="Tasks"> < /OBJECT>
· Open your eyes and see what you have done..!!!??. The “Inbox” and “Tasks” are welcoming you on your web page.
· Control your ecstasy and Click OK there in the right hand side.
· If this is a Publishing Page, publish it or if it is a team site, then Exit edit mode.
· Wooo... hoooo… TADAAAA….!!!. You can see the “Inbox”, “Tasks” have been fetched from your Outlook account and are served to you on your page..!! What a mind blowing job you have done…. ??
· OK... do you see something else there? A poor guy... a “New” button?? Don’t get confused... it is there because of you… and for you.. Since this activity is not able to provide you everything that an OOB web part can but yes it gives you at least some hold to you to have done your customizations.
· So that’s all form me... what else are you waiting for??? Go and play with your Outlook now…!!
You rock…!!!

No comments:
Post a Comment