Todd Bleeker's 12 Hive

All MindsharpBlogs

Are you pondering what I'm pondering?

My Links

Post Categories

Archives

Blog Stats

CEWP vs. OWA Web Part

More CEWP treasures languishing on my hard drive. I haven't checked to see if others have posted similar CEWP ideas but I doubt it.

 

The Out-of-the-Box (OOB) OWA Web Part initially looks like this:

It must be configured (something most user’s find difficult):

 

And it has limited functionality, you are often prompted to authenticate again, and it takes longer to load than the rest of the page:

 

The following CEWP lets users that have the Outlook client on their desktop work with any folder in a much richer interface than the OOB OWA Web Part. Since it just shows the local folders from Outlook, it also doesn't require configuration like the OOB OWA Web Part does. The Inbox and Tasks are used in the code sample but it could show Contacts, a public folder, etc. The sample also shows two folders but you can just show one or show a whole bunch organized within HTML however you’d like to display them. Of course, it’s only as up to date as Outlook:

 

<!-- Copy and paste this code into a CEWP -->

<OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046"

 width="100%">

  <param name="Folder" value="Inbox">

</OBJECT>

<OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046"

 width="100%">

  <param name="Folder" value="Tasks">

</OBJECT>

 

Yep, that’s it -- amazing isn’t it. Not really, it’s just using an object already installed on the desktop along with Outlook. So, you get all the functionality that you would normally have in Outlook on the Web page.

 

 

Unfortunately, none of these options provide the ability to create a NEW email message. So, I created this CEWP that has all the code necessary to create a new message. I just call the JavaScript on the OnClick of a button. I’m sure that the interface and the code could get a lot fancier (new Task, new Contact, etc.) but you get the idea (script does not work with Outlook 12):

 

<!-- Copy and paste this code into a CEWP -->

<script language="JavaScript" type="text/JavaScript">

function genNewEmail()

{

  try

  {

    o = new ActiveXObject("Outlook.Application");

    if(o)

    {

      mailFolder = o.getNameSpace("MAPI").getDefaultFolder(6);

 

      //You could also use custom forms like IPM.Note.CustomForm

      mailItem = mailFolder.Items.add("IPM.Note");

      mailItem.Display(0)

    }

  }

  catch(e)

  {

    window.status = e.Message;

  }

}

</script>

 

<input type="button" value="New Message" NAME="cmdNewMessage" OnClick="genNewEmail()">

 

 

When you click on the button you should get the new message dialog from your local Outlook installation.

 

<Todd />

 

PS: Watch out, code pasted into a blog post like this can introduce line breaks and odd spacing that can cause problems. I try to keep my lines shorter than 80 characters but look for unnatural line breaks.

posted on Thursday, August 17, 2006 8:59 AM

Feedback

# re: CEWP vs. OWA Web Part 8/18/2006 6:09 AM Kevin Buchan

Todd,

This is AWESOME. I played with this and have nearly every Outlook view saved as a seperate .DWP file. The one that is plaguing me (and seems to be of the most immediate value to me) is the "Outlook Today" home page.

Anyway, I made changes to your "genNewEmail" function that I think will better support new versions of Outlook. Just a guess.

Thanks again!

-Kevin Buchan
kevin.buchan@troutmansanders.com
(Code omitted since my comment post that included the code was not accepted.)
Please email me for the simple code change.

# Outlook Webparts mit dem Inhaltseditor-Webpart 8/21/2006 7:51 AM SharePoint, SharePoint and stuff

Todd Bleeker nutzt in seinem Artikel CEWP vs. OWA Web Part&nbsp;mit dem Outlook-Client installierte Komponenten,...

# re: CEWP vs. OWA Web Part 8/28/2006 8:56 AM Ben Weeks

Hi Todd, I like - made me wonder if you can embed Word docs in a similar way ...

<OBJECT CLASSID = "clsid:00020906-0000-0000-C000-000000000046"
WIDTH = 640
HEIGHT = 480>
<PARAM NAME="File" VALUE="http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/x64KMSigning.doc">
</OBJECT>

Does seem to work though - so I guess not :-(

# Displaying Embedded Documents in a SharePoint Web Page 8/30/2006 8:51 AM Webtechy Blog

Let's suppose you want to display Word documents within a SharePoint web page. H

# re: CEWP vs. OWA Web Part 8/31/2006 1:59 PM Todd Bleeker

You can show Word documents using the Page Viewer Web Part.

<Todd />

# re: CEWP vs. OWA Web Part 9/12/2007 4:23 PM Bob

I like this a lot. I used something very similar in 2003. Anyway, I have setup the calendar in the same fashion but I cannot control the view. Can you help me setup a script, very much like your new mail button, that lets the user select between, day, week, month view?

Thanks

#  10/24/2007 3:46 PM Aidan Garnish

Using the Content Editor Web Part to access Outlook inbox

# Using the Content Editor Web Part to access Outlook Inbox 11/14/2007 1:43 PM Mirrored Blogs

http://mindsharpblogs.com/todd/archive/2006/08/17/1250.aspx

# Setting the View 11/16/2007 2:02 PM Philip Waters

Don't use a Param to set the view
http://www.outlookcode.com/article.aspx?id=70

# Outlook Web Access - Toolbar | hilpers 1/17/2009 11:39 AM Pingback/TrackBack

Outlook Web Access - Toolbar | hilpers

# My Inbox web part | keyongtech 1/21/2009 10:27 PM Pingback/TrackBack

My Inbox web part | keyongtech

# OWA Web Part in SharePoint &laquo; Gareth M Davies 3/9/2009 11:19 AM Pingback/TrackBack

OWA Web Part in SharePoint &laquo; Gareth M Davies

# SharePoint Basic Needs &laquo; Amol Ghuge&#8217;s SharePoint Blog 3/20/2009 2:36 PM Pingback/TrackBack

SharePoint Basic Needs &laquo; Amol Ghuge&#8217;s SharePoint Blog


Comments on this post are closed.
Title  
Name  
Url
CAPTCHA
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments