Welcome to MSDN Blogs Sign in | Join | Help
Recording of Recent OBA MSDN Webcasts...

Hey gang,

Over the past couple of weeks, I've presented a couple of OBA webcasts. I thought you might be interested in taking a look at them.

1. MSDN WEBCAST: DEMYSTIFYING OFFICE BUSINESS APPLICATIONS FOR THE DEVELOPER (LEVEL 200)

LIVE MEETING REPLAY URL:

 

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380040&role=attend&pw=D222B9F5

2. MSDN WEBCAST: DEMYSTIFYING OFFICE BUSINESS APPLICATIONS FOR THE BUSINESS ANALYST (LEVEL 100)

LIVE MEETING REPLAY URL:

 

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380026&role=attend&pw=2376C7F8

Enjoy,

Steve

 

Create Your First OBA: Part 4

Wow, it's been a while since I blogged on this...time flies. If you've been following along with my previous posts, you'll have seen some of the other Create Your First OBA posts. Here they are if you haven’t seen them:

1.       Creating the VSTO document-level solution (i.e. the custom document);
2.       Deploying the VSTO document-level solution;
3.      
Integrating the VSTO with SharePoint content type;
4.      
Associating SharePoint workflow with VSTO document-level solution;
5.      
Customizing SharePoint (BDC);
6.      
Customizing SharePoint (Excel Services).

This post describes how you can add workflow to your OBA.

First, let me say that I can’t believe the amount of people who are asking me about this. I’ve presented at a number of conferences over the last few months and I’ve been getting more questions around this particular subject. That said, a specific walkthrough on exactly how to do this is quite long so I’ll walk through at a high level what you need to do, and then I’ve added a few references for you and also attached a hands-on lab that you can use as well to walk through—complete with code samples.

You’ll also note that the code samples cover other areas of OBA development—mainly covering client-side development using VS 2008 (specifically VSTO 3.0). Some great code samples and walkthroughs, so enjoy.

Okay, back to workflow. To create a SharePoint (SP) workflow you first need to make sure you have an ‘object’ within SP against which you’ll build the workflow. A Word document might be an example or an InfoPath can be another example. You then need to figure out what type of workflow you’re going to build and what the workflow will do. The SP workflow derives from the Windows Workflow Foundation (WF) workflow types in the .NET Framework 3.0, so the two main types are Sequential and State Machine. Sequential being as it sounds: a workflow that follows a particular sequence. And State Machine being a workflow that moves along to the next ‘activity’ depending on the state of the workflow. An activity are the individual actions that make up a workflow. If you’d like more details on SP WF, you can check out these links here:

1.       Book excerpt from Programming Office Business Applications: http://msdn.microsoft.com/en-us/library/cc534997.aspx.

2.       You can also find some articles here in the VSTO 3.0 documentation: http://msdn.microsoft.com/en-us/library/bb386211.aspx.

So, once you’ve figured out what your workflow will do (and let’s assume for simplicity sake that you’re going to build a Sequential workflow), you then open Visual Studio 2008, click File, New, Project, select the Office node under the language node of your choice (i.e. either VB or C#) and then select SharePoint 2007 Sequential Workflow, give it a name and click OK. This will invoke a wizard that will enable you to give the workflow a name and map the workflow template (each workflow is built and deployed as a template) to your specific SP site. Once this is done, click Next and then you can select the library or list you want to associate your SP workflow with, the History list and then the Tasks. In mine, I had a document library for the custom Word document I built earlier in the blog series (called Annual Reviews) so I built a small approval workflow (that updated a status note that corresponds to that particular document library. At this point, VS creates a project shell with a number of items in it. You can drag and drop activities onto the designer, add code behind for the activities and then map the properties of the workflow to the activities to make sure everything works. You can then press F5 to test out your workflow and it will invoke SP and run your workflow.

Now, keep in mind I just encapsulated in one paragraph what will take you an hour to walk through in the attached hands-on lab—which is why I chose the really condensed version—and even longer when you’re planning out your own SP workflow. I did this to not only save some time in writing the blog, but also because the resources I’ll provide below will help you just as much if not better.

So, here’s what I would recommend as next steps for you to get really get stuck into learning SP workflow:

1.       Take a look at the attached hands-on lab and walk through lab #4. It’s an awesome and simple example of how to quickly create a simple workflow. (The lab uses VS 2008 (VSTO 3.0), and you'll need to have Office 2007 installed and a MOSS 2007 server available to build your workflow against.)

2.       Take a look at the following web cast. It’s a great intro to SP workflow and provides you with some deeper-level information: http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&EventID=1032378840&CountryCode=US.

3.       Take a look at following new site for SP developers; it’s got some awesome content: http://mssharepointdeveloper.com.

Okay, hopefully that will get you started.

Steve

 

 

 

Interesting OBA Blog on DITA...

A colleague sent this to me today...thought it was interesting, so I thought I'd pass along to you all.

http://blogs.msdn.com/johnmullinax/archive/2008/06/17/democratizing-dita-dita-exchange-and-danish-beer-20-questions-with-steffen-frederiksen-of-content-technologies.aspx

Steve

SharePoint Development Webcast Series

There's also a number of webcasts you all might be interested in seeing as well. For more information, check out:

http://blogs.msdn.com/pandrew/archive/2008/05/12/sharepoint-developer-msdn-web-cast-series.aspx

Each MSDN Web Cast is an introduction for .NET Developers to SharePoint and the Topic. You need to register for the web cast by clicking the link and entering some details. Then you get emailed a link to sign on and participate in the web cast on its date and time.

Date

Topic and Signup URL

Presenter

May 20th 9AM PST

Web Parts

Robert Bogue

May 21st 9AM PST

Data Lists

Robert Bogue

May 27th 9AM PST

Silverlight

Andrew Connell

May 28th 9AM PST

Event Handlers

Andrew Connell

June 3rd 9AM PST

Page Branding

Andrew Connell

June 4th 9AM PST

Workflow

Robert Bogue

June 10th 9AM PST

Web Services

Andrew Connell

June 11th 9AM PST

Page Navigation

Andrew Connell

June 17th 9AM PST

User Management

Robert Bogue

June 18th 9AM PST

Content Types

Robert Bogue

Each MSDN Web Cast is recorded for later viewing which should be through the same registration URL.

SharePoint Development Conference (FireStarter) at Microsoft on June 11th

OBA is a broad area and we're seeing an increase in the number of developers who are building SharePoint solutions--both internally to an enterprise and externally on the web. Microsoft is hosting a 1-day event for those of you interested in learning more about SharePoint development. More information on this event, how to register and who to contact for more information is below:

SharePoint Web 2.0 Fire Starter!

 

In typical FireStarter event style, we aim at delivering a first class experience to all attendees and make them experts on developing on SharePoint technologies before the end of the event. We have great speakers from the Microsoft rooster presenting some awesome topics that will help you build and customize websites with SharePoint and Web 2.0 technologies. You cannot miss this action packed day!

 

Here’s what the agenda looks like:

 

AGENDA

 

 

8:00 am – 8:30 am

Breakfast

 

8:30 am – 9:00 am

Introduction to day

Mithun Dhar

9:00 am – 10:00 am

Whirlwind SharePoint on Visual Studio - VSeWSS

Paul Andrew

10:00 am – 10:15 am

Break

 

10:15 am – 11:15 am

Silverlight on SharePoint

Steve Fox

11:15 am  – 12:15 pm

Web Parts on SharePoint

John Durant

12:15 pm – 1:00 pm

Lunch

 

1:00 pm  – 2:00 pm

Web Services on SharePoint

Paul Stubbs

2:00 pm  – 3:00 pm

Workflow on SharePoint

Eilene Hao

3:00 pm  – 3:15 pm

Break

 

3:15 pm  – 4:15 pm

Event Handlers on SharePoint

Chris Johnson

4:15 pm  – 5:00 pm

Page Branding on SharePoint

Paul Andrew

Post Event

Pizza and Networking

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Where: Microsoft Conference Center (Building 33) – Kodiak Room

 

When: June 11th 2008 - Wednesday

 

Register NOW!

 

If you have any questions, please contact Mithun Dhar at mithund@microsoft.com.

 

Create Your First OBA: Part 3

Hey gang,

If you've been following along with the Create Your First OBA series, I've published the first two of the six parts - see below.

1.       Creating the VSTO document-level solution (i.e. the custom document);
2.       Deploying the VSTO document-level solution;
3.       Integrating the VSTO with SharePoint content type;
4.       Associating SharePoint workflow with VSTO document-level solution;
5.       Customizing SharePoint (BDC);
6.       Customizing SharePoint (Excel Services).

I was actually hedging on posting for the third item because I wrote an article for MSDN Magazine that covers it. So, I'll provide you with a link to the article which lives here: http://msdn.microsoft.com/en-us/magazine/cc507632.aspx.

I'm on the road again at Sapphire for the next few days, so if you're in Orlando at the conference look me up...I'll be dutifully hanging out at our booth. When I get back, I'll post on SharePoint workflow. As I mentioned in an earlier post, there's been a lot of requests for this so hang tight and I'll get to it soon.

Have a great weekend!

Steve

The OBA Sample Application Kits

Just a quick post to check out the OBA Sample Application for Kits MSDN page. The kits provide comprehensive guidance on how to integrate Office with SAP and PeopleSoft (and we'll have others in the future). The kits include whitepaper, install guide, technical walkthrough doc, and source code. We announced the latest of the kits (the OBA Sample Application Kit for PeopleSoft) last week at Kurt DelBene's keynote at Collaborate 08.

You can get to the page here: http://msdn2.microsoft.com/en-us/office/cc442491.aspx

From this page, you can get to the individual kits.

Check it out! This is awesome stuff, and it is a rarity to find kits that provide guidance against these two very popular LOB Systems (that is PeopleSoft and SAP).

Cheers,

Steve

 

Conference Follow-Up Post

Over the past few weeks, I've attended and presented at a number of conferences (specifically VSLive, MS CSAF, Collaborate, and DevConnections) and had some great conversations with attendees who were seeking more information or had questions in the sessions on additional OBA resources. During some of these conversations, I promised to follow up in my blog on some specific issues/questions. In this blog post, I've added some additional information on:

  • Deployment
  • SharePoint Workflow
  • Outlook add-in development

I'll also be following up on this post in the future with additional information, so I encourage you to check back or RSS the blog (as I'm not exactly to a schedule when posting).

Deployment

In a couple of my sessions, we had some detailed conversations around deployment. Here is a question that I was going to check on. I've also added some additional information that you can check out.

1. Can you point to the root folder assembly and have it point to the latest version of the bits? (This was in relation to mapping a content type from SharePoint and then invoking the assembly from the doc library.) The answer to the question, as I suspected, was yes--and that the deployment manifest should point you to the right location. However, the thing I forgot to mention was that you have to make sure that in your deployment properties you have "Check every time the customization runs." Also, this is not the default setting; the default setting is "Check Every 7 Days." So, once you publish a solution with that configuration, each time the custom document is opened you will get the latest version of the assembly associated with that document.

Misha Schneerson, one of the devs on VSTO, has a great multi-part post on Deployment. While we've made it easier in VS 2008 (by virtue of ClickOnce), there are still some things to keep in mind. You can check out his blog here: http://blogs.msdn.com/mshneer/archive/2008/04/24/deploying-your-vsto-add-in-to-all-users-part-iii.aspx.

SharePoint Workflow

Many of you asked me about some additional workflow guidance. I've pinged a couple of different people, and we're going to put together a blog-post with some additional information. I've also requested some web-casts to address some of the basics. I'll post pointers as these become available. Until then, here are a few things to get you started:

1. http://channel9.msdn.com/ShowPost.aspx?PostID=358685

2. http://office.microsoft.com/en-us/sharepointdesigner/HA101005911033.aspx

3. http://blogs.msdn.com/nikhil/archive/2007/09/11/vsto-and-sharepoint-workflow.aspx

4. http://msdn2.microsoft.com/en-us/library/bb386168.aspx

I'm also working on a couple of other things (whitepaper and webcast) that I'll try and get out to you soon.

Outlook Add-in Development

I'm noticing more and more developers extending Outlook. In one of my sessions, we talked a little about deployment across 2003 and 2007 instances of Outlook and we also discussed migration of OFS form regions to managed code OFRs. Here is some additional information for you guys on this:

 Outlook 2007 should host an Outlook 2003 add-in.  Mary Lee recently wrote a blog post about developing and testing an Outlook 2003 add-in on a computer running Outlook 2007.  You can read more at this post -  http://blogs.msdn.com/vsto/archive/2008/03/20/developing-an-add-in-for-multiple-versions-of-office.aspx.

Note that the deployment method isn't Office version specific; it's VSTO runtime specific.  A VSTO solution that works for both O11 and O12 must be designed with the VSTO 2.0 runtime and .NET FX 2.0, so the same setup project with CASPOL deployment would apply.

There is also an interesting topic named "Creating Solutions for Multiple Versions of Office" at http://msdn2.microsoft.com/en-us/library/bb772080.aspx.

We do have topics that discuss how to import an OFS into an Outlook 2007 project.  We also discuss the advantages and disadvantages of importing a form region vs. creating one fresh by using our designer.  I will admit that the discussion of using an OFS file is not overly extensive.  However, I don't think we missed any discussion critical to who are considering the idea of moving their OFS files to VSTO.  Here are the topics that discuss using an OFS file:

·         Creating Outlook Form Regions - http://msdn2.microsoft.com/en-us/library/bb386301.aspx.

·         Walkthrough: Importing a Form Region that was Designed in Outlook - http://msdn2.microsoft.com/en-us/library/bb608611.aspx.

·         Accessing a Form Region at Run Time - http://msdn2.microsoft.com/en-us/library/bb772084.aspx.

Note: Thanks to the VSTO dev team and UE team for providing responses to my field notes and queries.

To those of you who attended my sessions and had questions, I hope the above at least gets you started. If not, I'll be sure to post more in the coming days and weeks.

Steve

 

 

Create Your First OBA: Part 2

Hey gang,

I just got back in the office from Collaborate 08 and DevConnections. Each conference I attend, I see more people interested in Office development which is really exciting to see. With SharePoint on the increase, a very pervasive Office client out there, and more companies wanting to realize gains by pulling data into Office views, I think the wheel is really starting to turn here.

Okay, that said let's talk about our second part of the development of your first OBA: deployment.

Depending on whether you've got a client-side customization (which we're doing in this series of blogs) and/or you've also got a SharePoint component to your OBA, deployment is different. With SharePoint, you need to have to deploy the site and then use the features of SharePoint to create web parts that interact with your data. (This is out of scope for this blog, but I will address it in a future one.) For the client, though, deployment means making sure that the add-in you build is i) discoverable by your org, ii) executable by those who want to download the bits, and iii) trusted by the specific Trust Center for the Office application you've built the add-in for.

If we build off of the last blog, to deploy the client add-in that we created (the Word 2007 document-level solution), you need to do the following:

1. Create a share that is accessible. To test this, I'll set up a share either on my host machine or a machine on the network.

2. Provide the appropriate permissions (or request if you do not have the permissions to do it yourself) for those who you want to download the bits.

3. You then go to the Project Properties, and go to the Build tab and add the folder share you just created in the Build Output field. Also, on the Publish tab add the same folder share to the Publishing Folder URL and the Installation Folder URL.

4. You then need to ensure the customization will be trusted by Word, so close the VS project and open Word. Click the Office button and then click Word Options. Then select Trust Center, Trust Center Settings, Trusted Locations, and click Add New Location.

5. You then add the folder share where the VSTO bits will be published to in the Trusted Location field (and don't forget to click the Subfolders... check box as well).

6. While you're here, you'll also want to add the document library URL for your SharePoint site. You'll see why later, but essentially when you create a content type and map it to your bits the location from SharePoint (and its subfolders) also needs to be trusted.

7. Open your VS project again, and then navigate to your project properties. On the Publish tab, click Publish Now.

And that's it. Your smart client Word doc should now publish all of the bits to the location you provided to it. You can test out on a folder share and then test the installation from another machine.

Note: In a follow-up post to a recent string of conferences, I've posted an additional link that will help you through a number of deployment scenarios: http://209.34.241.67/steve_fox/archive/2008/04/25/conference-follow-up-post.aspx.

Steve

Create Your First OBA: Part 1

Last week I attended VSLive and promised to post some of the sample code (I emphasize demo code J) I discussed at the conference. Specifically, in the couple of sessions that I did I discussed SharePoint integration with Word (showing a lightweight OBA) and the creation of Outlook add-ins using Visual Studio 2008 (VSTO 3.0). In an earlier post, I showed you how to create an Outlook add-in and integrate with external data using a custom task pane. I also showed you how to create an Outlook Form Region. I also published an article on this in the most recent MSDN magazine http://msdn2.microsoft.com/en-us/magazine/cc164242.aspx.

 

So, I’m going to focus on the OBA side of things through six posts, which I’ll break out as follows:

 

1.       Creating the VSTO document-level solution (i.e. the custom document);
2.       Deploying the VSTO document-level solution;
3.       Integrating the VSTO with SharePoint content type;
4.       Associating SharePoint workflow with VSTO document-level solution;
5.       Customizing SharePoint (BDC);
6.       Customizing SharePoint (Excel Services).

 

The Lightweight OBA scenario is essentially an annual review process that uses a custom task pane to load employee data and then map it to a set of Word content controls in the document. The data comes from a SQL server and can be updated from the custom task pane as well. Further, the document is tied to a SharePoint content type and has some workflow associated with it. (I currently have some oob workflow associated with it, but I’ll create some custom workflow in the next couple of weeks and associate that with the document-level solution).  To make things a little easier to get started, I’ve posted my VSLive deck to this post so you can walk through the deck…I’ve included screenshots with the deck so you can get a sense for what my demo looked like. Note that it is a work in progress!

 

So, since this is the first of these five posts I’ll cover the creation of the VSTO document-level customization.  Alright, here goes:

 

The first thing you’ll want to do is to make sure you have an employee database (keep it simple with a table) with some records in it. In my solution, I have a few records each with an employee name, ID, title, and review scores for three years. I’ve also got some fields for the comments and ratings that you’ll use when uploading the comments. Take a look at the screenshots in the attached deck to get a sense for what fields I’ve created in the SQL Server table.

 

After you’ve got your table created, you’ll want to now go ahead and create your VSTO project. Note that when creating a document-level solution you can either create a document and then use that as the document in your development project or you can create and edit a blank document in the VS IDE. Depending on how complex you want your template to be, you can do either…but if you’re looking to build a complex template/document, I’d consider building it first and then using it in the project. Okay, open Visual Studio 2008, click File, New, Project, and then select either Visual C# or Visual Basic, Office, and Word 2007 Document. When prompted, select whether you want to use an existing document (if you created one here’s where you would browse to it) or not (in which case you would create/edit the document in VS). 

 

With your VSTO document-level solution created, you’ll want first add the data source (the employee table you created) to your project. To do this, click Data, Add New Data Source, select your SQL server instance, and the database within which the employee table resides.

 

After you’ve got your data added, you’ll now want to add a user control that will host a data view. Right click your project, click Add, User Control, and give it a name. The designer view will open by default, and you can drag over the fields that you want to load from the SQL server table (mine was called employee) onto the designer, which will automatically create a data view for you. In my custom task pane, I also created a bottom part to the custom task pane (see slide 13 for the entire custom task pane) which I mapped to the data that the manager would enter in as rating data for the annual review process. For each of the custom task pane sections I had a button which had a load event (took the currently selected data and added it to the document) and a Sync button (which mapped the completed fields in the document to the fields in the custom task pane). You could then subsequently save the data using the data view back into SQL server.

 

Okay, you should now have the data source added to your project and the user control created. The next thing you’ll want to do is customize the Word document. In my document, I opened the Word document in the designer view and then dragged a few content controls from the Word Controls part of the Toolbox and create a document that could then house some external data (see slide 21).

 

After you’ve done all of this, we now need to do a couple of things to finish Part One: 1) add some code to load an instance of the user control into a custom task pane when the assembly is loaded by the host application and 2) add some mapping code between the data from the custom task pane to and from the document.

 

1) The code for adding the user control to the custom task pane will be added to the core ThisDocument.cs file:

using System;

using System.Collections.Generic;

using System.Data;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using System.Xml.Linq;

using Microsoft.VisualStudio.Tools.Applications.Runtime;

using Office = Microsoft.Office.Core;

using Word = Microsoft.Office.Interop.Word;

 

namespace _2008AnnualReview

{

    public partial class ThisDocument

    {

                   

        private AnnualReviewTaskPane ctrl = new AnnualReviewTaskPane();

       

        private void ThisDocument_Startup(object sender, System.EventArgs e)

        {

            this.ActionsPane.Controls.Add(ctrl);

        }

 

        private void ThisDocument_Shutdown(object sender, System.EventArgs e)

        {

        }

       
 

    }

}

 

2) Mapping code between custom task pane and Word document.

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Drawing;

using System.Data;

using System.Linq;

using System.Text;

using System.Windows.Forms;

 

namespace _2008AnnualReview

{

    public partial class AnnualReviewTaskPane : UserControl

    {