A free tool for link checking with SharePoint 2007

http://www.microsoft.com/web/spotlight/seo/?appid=10990002

Microsoft’s free SEO Toolkit, does things like link checking/site analysis, site map generation and so on.

Advertisements

How to implement an InfoPath 2007 clear button

Creating a clear button is quite straight forward in InfoPath. Basically you have to set up a rule to clear the content from each field on the form. This can be done with the following steps:

Add a button to your Form, call it ‘Clear’
Add a rule to the button
Do not set a condition to the rule
Add an action to set each field value to be blank / empty
Click OK, done.

Sending out multiple email links from SharePoint 2007

Question:
 
I am trying to email from Sharepoint, but I want to email several documents in one email.
I have tried:
               > Send To
                               >Email Link
 
But I do not seem to be able to email more than 1 document – can you tell me how I can do this ?
 
 
Answer:
 
Unfortunately there is now easy way to do this other than how you’ve already described.
 
One thing you could try is creatingan Announcement in the announcements web part with links to the documents and then alert your users to the announcement. However, copying and pasting links it into the announcement is hardly any different to creating an email and just as time consuming.

Writing a custom workflow in SharePoint 2007

After spending days trying to get my custom workflow to work, I’ve finally got there and as always, it’s the tiny mistakes that cause major failures.  The key thing I’ve learnt from this exercise is tobe very careful when producing XML files.  As I’ve discovered, Workflow production is ultra Case Sensitive and the slightest fault will throw errors after deployment.
 
This may become a long blog posting, but should help developers as a useful reference when creating a Custom Workflow.
 
In this step through guide, I’m going to explain how I created a Sequential Workflow and more importantly deployed the solution into thehttp://mycheshireteamslocal:24001 environment using my virtual development image.
 
The solution files for this walkthrough can be downloaded from the SharePoint Team Project within Team Foundation Server
 
Introduction
 
We are going to create a sequential workflow (a workflow that typically has several predictable paths of execution that can be modelled in the form of a flowchart) and tie it to a custom list with one column – ‘Title’.
 
When activated, the workflow with change the title of the list item to a numberbetween 1 to 6 randomly, much like rolling a dice.
 
Through this step by step walkthrough, I will demonstrate how to create this workflow and most importantly how to deploy and debug a workflow successful. You will need to perform the following steps to author such a workflow –
1.Creating a Project in Visual Studio 2005
2.Design your Workflow
3.Code your Workflow
4.Create a feature.xml
5.Create a workflow.xml
6.Assigning a Strong-Name Key to the solution
7.Amending thePostBuildActions Batch File
8.Building the solution
9.Testing and Initiating the Workflow inhttp://mycheshireteamslocal:24001 
Step 1 – Creating a Project in Visual Studio 2005
·        Within your Virtual development image, power up Visual Studio 2005 by clicking on Start > All Programs > Microsoft Visual Studio 2005 > Microsoft Visual Studio 2005

·        Create a new project calledRollOfDiceWF in Visual Studio 2005. Base this project on the installed SharePoint Server Sequential Workflow template. New projects created with this template provide a collection of starting files to help you get started.
Step 2 – Design your Workflow
In this example we will be calculating a random number between one and six and then update the list item’s title column with that random number. 
·        Now, that you have created a project, double click workflow1.cs in the Solution Explorer pane. 
A SharePoint Sequential Workflow designer window should now be displayed and look similar to this:

In this view, Workflow programs can be created by dragging and dropping activities onto the designer screen.
Notice the onWorkflowActivated1 event that has been created automatically. This activity will fire when the workflow is activated. This needs to always be the first activity.
We could enter all of our code in the onWorkflowActivated1 event, but as a best practice we should create our code elsewhere and leave this event to activation-type activities.
In the toolbox, you will see a number of activities that you can choose from.
·        From the Toolbox, select the Code activity and drag it under the onWorkflowActivated1 event.
Your screen should now look like this:

Notice the red exclamation icon next to our Code activity. This is because we have yet to define the code which will fire when the event executes.
Step 3 – Code your workflow
·        Double-click on the Code activity in the designer window. Visual Studio will create a method for you to write code and automatically link it to the activity.
There are two important things to note here. Two private fields have been created above our code activity event method. These are theworkflowId andworkflowProperties. TheworkflowId is a uniqueguid that is assigned to a given instance of a workflow. TheworkflowProperties object is a collection of properties that relate to the workflow.
Now go ahead and modify the code to look like as below:
privatevoid codeActivity1_ExecuteCode(object sender,EventArgs e)
{
   Random rnd =newRandom() ;
   workflowProperties.Item[“”Title””] = rnd.Next(1, 6);
   workflowProperties.Item.Update();
}
This code will generate a random number between 1 and 6. TheworkflowProperties.Item is used to access the List Item that this workflow is operating from.
That’s it, the workflow is written. Now we’ll need to prepare the workflow for deployment by editing the feature.xml and workflow.xml files.
Step 4 – Creating a feature.xml file
The Visual Studio template will deploy your workflow as a feature. So the next step is to go ahead and create a feature.xml file to help facilitate the deployment.
·        Under theDeploymentFiles >FeatureFiles folder – you will find a feature.xml. Double-click this file to view its source code. This will need to be edited accordingly. To help get started insert theintellisence feature.xml code snippet into your feature.xml file. Right click over the content of your xml file and choose Insert Snippet > SharePoint Server Workflow >Feature.Xml Code as illustrated.

·        Once the feature is inserted, go ahead and modify the green place holders, so your feature.xml looks a bit like this:

 
 
   
   
   
     false
   
 

·        It is important you create your own unique GUID and populate this in your feature.xml file. New GUID’s can be created through Visual Studio by clicking Tools > Create GUID as illustrated:

Step 5 – Creating a Workflow.xml file
Similarly, after inserting the workflow.xml snippet, edit the OOTB workflow.xml to look similar to this example. This XML file is case sensitive, be very careful when editing as any errors may cause the workflow to fail following deployment:

 
 
   
   
   
     false
   
 

You will notice a number of custom input form lines of code have been removed as these are not required in this walkthrough. Left in, this will cause the workflow to fail after deployment.
·        It is important to ensure thePublicKeyToken for your assembly is added to the workflow.xml file. To get the public key value of our assembly you will need to open a Visual Studio 2005 Command Prompt. This can be found via the start menu by going Start > Program Files > Visual Studio 2005 > Visual Studio Tools > Visual Studio 2005 Command Prompt. In the command prompt type :sn -T “”path to your workflowdll””
Step 6 – Assigning a Strong-Name Key
Deploying the workflow again can cause a few issues. Firstly, before deploying the solution you will need to assign a strong name key to the class library by following these steps:
·        In Solution Explorer, right-click the bold project name that is in bold type, and then select Properties.
·        Click the Signing tab.
·        Select the Sign the assembly checkbox.
·        From the Choose a strong name key file: combo box, select
·        In the Create Strong Name Key dialog box, in the Key file name: text field, enter a string value.
·        ClearProtect my key file with a password, and then click OK.
·        Close the Signing window.
·        From the Build menu, click Build Solution.
·        From the File menu, click Save All.

Using SharePoint to manage Visio data

You can share documents among team members by placing them in a document library. The team can manage documents directly from the SharePoint site. Working from the SharePoint site provides the team with check-out, check-in, viewing, editing, and discussion group functionality.Uploading Files to a Document Library

You can add files to a document library several ways: For new documents, in the document library, select New and then choose the type of document or folder you want to create. If there are existing files that you want to add to a SharePoint site, select Upload and then choose Upload Document or Upload Multiple Documents to add many files at one time. (You can also add files directly from Visio. This is covered in the next section.)To investigate files in the document library

On the SharePoint site, click a document library to display the files within the library.
Notice the columns of file data (some columns are displayed by default and others can be added by the library administrator):
Type—An icon showing the type of file; for example, a Visio icon or a Word icon.
File Name
Modified—The last time the file was modified.
Modified By—The name of the user who last updated the file.
Check Out To—Who has the file checked out. (This is an optional column that can be easily displayed by modifying the default view.)
Move the pointer over a Visio drawing file. Notice that the file becomes shaded and a drop-down list box is presented.
Select the drop-down list. The following items appear:
View Properties
Edit Properties
Manage Permissions (New in Windows SharePoint Services 3.0)
Edit in Microsoft Office Visio (Choosing this option opens a drawing file in Visio. You can edit the file and, when you close it, you are prompted to save changes.)
Delete
Send To (New in Windows SharePoint Services 3.0)
Check Out
Add to My Links (New in Windows SharePoint Services 3.0)
Version History
Alert Me
Discuss
Note:
Opening a drawing within Internet Explorer or in Visio does not automatically check out the file from the document library or lock it to the user who is making the change. Any team member who has write access to the document library can change files within the library. To help manage this process, Windows SharePoint Services provides a Check Out function and displays the name of the user who currently has the file checked out. This lets other team members know who is in the process of editing the file.Enforcing Check Out with Windows SharePoint Services Settings

Check Out is not required by default, but you can turn it on.To turn on Check Out

On the Settings menu, select Document Library Settings, and then select Versioning Settings.
Within Versioning Settings, set Require Check Out to Yes.
Note:
Requiring Check Out means that only one user can modify a file at a time. This reduces the possibility that changes will accidentally be overwritten by another user.To view or edit a Visio drawing from a SharePoint document library while using enforced Check Out

Click the name of a Visio drawing in a document library. A check-out dialog box appears, as shown in Figure 1. If you want only to view the drawing, you can open the file as read-only without checking out the file from the document library.
Figure 1. Checking out in the document library

To edit the drawing, select Check Out and Edit. The drawing is checked out from the SharePoint document library and opened within Visio. When the drawing is opened for editing in Visio, the File menu in Visio is modified to add a Check In command and a Discard Check Out command, as shown in Figure 2.
Figure 2. Check In and Discard Check Out commands in Visio

Modify the Visio drawing and then use Check In to check it back into the document library. The Check In dialog box appears, enabling you to save versioning comments along with this version of the drawing.
Figure 3. The Check In dialog box

Click OK to save the Visio drawing, check it back into the document library, and close the drawing file in Visio.Accessing Documents Stored on a SharePoint Site from Visio

Files stored on a SharePoint site can be accessed by the Office applications that created them, including Visio. You can use Visio to create a drawing that is saved to a SharePoint site, or you can use it to view or edit an existing drawing that someone else created and saved on the SharePoint site.
To create a drawing and save it to a SharePoint site

Create a drawing in Visio.
On the File menu, click Save As.
Navigate to the network location that is your SharePoint site. If prompted, provide a login and password.
Navigate to the document library folder where you want to save the file, and then click Save.
Note:
Go to the SharePoint site and view the information for the file that you just saved. The Modified By field contains the user name of the person who created the file.
Note:
You can also place files on a SharePoint site by using the Upload menu directly from the SharePoint site.To open, edit, or replace a document on a SharePoint site

In Visio, on the File menu, click Open.
Navigate to the network location that is your SharePoint site. If prompted, provide a login and password.
Navigate to the Documents Library folder where the file that you want to open is located. Select the file, right-click, and then click Open (or double-click the file name to open the file).
If Check Out is enforced within the document library, the file is automatically checked out of the document library before it is opened for editing within Visio. When the drawing is opened for editing in Visio, the File menu in Visio is modified to add a Check In command and a Discard Check Out command.Editing Documents Stored on a SharePoint Site Offline

Windows SharePoint Services 3.0 enables you to capture data in an offline folder so that you can edit it while you are not connected to the server. Then, when reconnected, you can update your files on the server.
You can also do this with Visio drawings. In Figure 1, notice the check box Use my local drafts folder. The local drafts folder is the location for storing data when you are editing offline. To set the location of the local drafts folder, in Visio, on the Tools menu, click Options and then, on the General tab, click Service Options. The Service Options dialog box appears, as shown in Figure 4.
Figure 4. The Service Options dialog box
Viewing a SharePoint Task List as a Visio PivotDiagram

When you create a SharePoint site, several types of lists are created for you. These default lists include a discussion board and a calendar list. You can customize the default lists in many ways, or you can create custom lists with columns that you choose.
Lists can also take advantage of e-mail features, if incoming or outgoing e-mail is enabled on your site. You can set up some lists, such as calendars, announcements, blogs, and discussion boards, so that people can add content to them by sending e-mail messages. You can set up other lists, such as tasks and issue-tracking lists, to send e-mail messages to people when items are assigned to them.
Lists can include many types of data, ranging from dates or pictures to calculations based on other columns. You can import data into Visio as PivotDiagrams, from the lists created in Windows SharePoint Services. After it is in Visio, you can pivot the data on any data column. For example, you can easily pivot on the Checked Out To column to quickly understand who has files checked out, how many files are checked out, and which files are checked out.
In the following example, we display a task list created on a SharePoint site in Visio as a PivotDiagram. We then pivot the data to check the completion status of the tasks and to check who is responsible for each task.
SharePoint Server 2007 includes a command on the Actions menu of the task list to create a Visio PivotDiagram from a list of SharePoint tasks. After the data is in Visio, the full features of Visio pivoting tools are available for viewing the data.
Figure 5 shows the task data as it appears on a SharePoint site .
Figure 5. Deck building project task list from Windows SharePoint Services

To create a Visio PivotDiagram from this data, on the SharePoint site, on the Actions menu, click Create Visio Diagram. Visio is launched, if it is not already running, and a multipage PivotDiagram is created in Visio. The first page of the resulting Visio drawing is shown in Figure 6. It shows the tasks by Status: Completed, In Progress, and Not Started.
Figure 6. PivotDiagram in Visio, created from a SharePoint site

Notice the tabbed pages in the Visio window. Two additional views are automatically created: Workload Distribution and Incomplete Tasks by Assigned To. These views are shown in Figure 7 and Figure 8.
The Workload Distribution diagram, shown in Figure 7, shows the task data pivoted by Assigned To and then by Status; we can easily see the status of each worker’s tasks.
Figure 7. The Workload Distribution view

The Incomplete Tasks by Assigned To view, shown in Figure 8, is similar to the Workload Distribution view except that now we are looking at the tasks by Assigned To and then by Status, so we can identify all incomplete tasks by worker.
Figure 8. Incomplete tasks by Assigned To

A Visio diagram created from a SharePoint task list automatically presents three different views of data, but these are not the only views available to you. Diagrams are completely dynamic. You can create other views by choosing a pivot node and pivoting on a different category.Viewing a SharePoint Task List as a Visio Flow Diagram

You can quickly import and display data directly on your Visio shapes. The first step is to connect to the data source and import the data into your drawing. The second step is to link the imported data to shapes. See the articleIntegrating Visio 2007: Introduction to Integrating Visio with Other Microsoft Programs for simple examples of importing data and linking it to shapes in a Visio diagram.
In the following example, we start from a task list created on a SharePoint site. The tasks define the elements of a training course development project. An alternative view of this data that shows the logical sequence of the steps as a flow diagram would be very useful. You can accomplish this easily by importing the task data into Visio and associating that data to shapes in a Visio diagram.
Figure 9 shows a screen shot from the SharePoint site where the tasks are initially defined.
Figure 9. Task list as defined on a SharePoint site

To create a Visio flow diagram from this task list, we must first capture the data in the Visio environment:
In Visio, on the File menu, click New, select Flowchart, and then select Cross Functional Flowchart.
After the drawing window is established, on the Data menu, click Link Data to Shapes. The Data Selector dialog box appears, as shown in Figure 10.
Figure 10. The Data Selector dialog box

Select Microsoft Windows SharePoint Services list, and then follow the prompts to identify the SharePoint task list shown in Figure 9.
The data from the list is added to the Visio External Data window, as shown in Figure 11. Initially, all of the fields of data associated with these tasks are displayed in the External Data window.
Figure 11. The Visio External Data window

You can control which fields appear and the order in which they appear. Right-click within the External Data window, and then click Column Settings. The Columns Settings dialog box appears, as shown in Figure 12. Choose the columns to be displayed and the desired order, and then click OK to close the dialog box.
Figure 12. The Column Settings dialog box

Now that the data is in Visio, you can complete the flow diagram by completing the following steps:
Add Swimlane shapes and set text into the shapes.
Add a Process shape to the drawing.
Select a row of data in the External Data window, and then drag data from this row onto the shape. This associates the row of data with this shape.
Repeat adding shapes and associating rows of data until all of the desired data is associated with shapes in the drawing. (You do not need to associate all the rows of data.)
Add connectors.
At this point, the basic drawing is complete and the data is associated with diagram shapes. Now, suppose that the data is updated on the SharePoint site and you want to update the drawing. This is a one-step process! In Visio, right-click within the External Data window, and then select Refresh Data. The data in the External Data window is updated and the drawing is updated because the shapes are associated; they are updated at the same time.
To dress up the drawing a bit, add a theme to format the shapes and add associated data graphics to the shapes to display the task Title field and %Complete field as data on the shapes.
The final result is shown in Figure 13.
Figure 13. Final drawing showing Visio data connected to tasks imported from a SharePoint site
Viewing a SharePoint Calendar List as a Visio Diagram

In another example, data created as a SharePoint calendar list is linked to a Visio drawing and the calendar items are displayed as a timeline. Within a SharePoint site, you can change views on the calendar data. There is the normal calendar view, but in the calendar view it is difficult to see items spread over a long period of time. Figure 14 shows an image from a SharePoint list of calendar items in a datasheet view. Now we can see all of the items easily, but a graphical representation would enable you to more easily see the amount of time that exists between each item.
Figure 14. Calendar data in SharePoint datasheet view

To understand how to link to the SharePoint calendar data in Visio, we explore in greater detail the tools available in Visio for matching external data to Visio shapes. Sometimes the names of the Shape Data fields in Visio shapes do not match perfectly the data being imported. This example shows how to make that association without reprogramming the shapes.
The objective of this example is to link to SharePoint calendar data from Visio and integrate the calendar data into a Visio timeline drawing by using existing Visio timeline shapes. This example requires no programming. However, you need to make some adjustments to the data column header names that contain the SharePoint calendar data to match them with the shape data fields in the Visio timeline shapes. The milestone timeline shapes have predefined Shape Data fields: Task Name and Start. When the Task Name is set, its data is automatically displayed as text on the shape. The Shape Data for Start is used to automatically position the shape along a cylindrical timeline.
To force matches between the data fields

Start by creating a Visio timeline drawing. In Visio, on the File menu, click New, select Schedule, and then select Timeline.
Next bring the SharePoint data into the Visio drawing environment. On the Data menu, click Link Data to Shapes. The Data Selector Wizard appears.
Figure 15. The Data Selector Wizard in Visio

In the Data Selector Wizard, select Microsoft Windows SharePoint Services List. The Data Selector dialog box, as shown in Figure 15, appears. Select or type the path to the SharePoint site containing calendar data. Click Next, select Calendar, and then click Finish. The data is imported into the Visio External Data window, as shown in Figure 16.
Figure 16. Data imported into the Visio External Data window

From the Timeline Shapes stencil, add a Cylindrical timeline shape to the drawing page. The Configure Timeline dialog box appears, as shown in Figure 17. Configure the start and end dates based on the data being linked to.
Figure 17. Configure the start and end dates for the timeline shape

The next steps involve adding milestone shapes to the Visio drawing and linking the rows of data to the shapes.
Drag a Cylindrical milestone shape into the drawing. Notice that it automatically displays a date and text. The values are taken from the Shape Data fields Start and Task Name. Verify this by displaying the Shape Data window, selecting the shape, and experimenting with changing the values in these Shape Data fields.
The key to displaying the start date and the description from the SharePoint list item on the milestone shape is to have the SharePoint data take over the values in the milestone shape’s Shape Data fields.
Whenever data is linked to a Visio shape, new Shape Data fields are added to the shape for each field within the data—unless a Shape Data field of the same name already exists. You can easily force a match with the milestone shape’s Shape Data fields by changing the column headings in the Visio External Data window to exactly match the names in the Shape Data window.
In the Visio External Data window:
Right-click within the window, and then click Column Settings.
Select the column Start Time, and then click Rename. Change the name to Start.
Select the column Title, and then click Rename. Change the name to Task Name.
Figure 18 is a view of the External Data window after these changes have been made.
Figure 18. The External Data window after modifications to the column names

Note:
You can turn off the display of unnecessary columns by removing the check mark from the column name.To link all rows in the External Data window to shapes in the Visio drawing

In the Timeline Shapes stencil, select the Cylindrical milestone shape.
In the External Data window, select all of the rows, and then drag the selection from the External Data window into the Visio drawing. Because the Cylindrical milestone shape is the current selection in the stencil window, an instance of the Cylindrical milestone shape is added for each row of data.
The final result is shown in Figure 19. We have added a background page and a drawing title to dress up the drawing a bit.
Figure 19. Final linked drawing

Notice the Shape Data window for the selected shape. It shows the same data that is displayed in the External Data window for Start and Task Name, and this same data is shown as text on the shape in the drawing.
You can link to existing Visio shapes, even if they already contain text fields for displaying Shape Data. Some investigating might be necessary to determine what information is displayed on the shape. In this case, we modified the SharePoint Start Time data to be named Start. This allowed the existing Visio Cylindrical milestone shape to display the proper date without modification. Similarly, we changed the SharePoint Title field to Task Name

DebugBar for Internet Explorer

DebugBar V5.2 is an Internet Explorer plug-in that brings you new powerful features :

DOM Inspector: View DOM Tree and modify tags attributes and css attributes on the fly to test your pageHTTP Inspector: View HTTP/S request to check cookies, GET and POST parameters, view server infoJavascript Inspector and Javascript Console: View javascript functions for easier debugging, see Javascript and AJAX codeHTML Validator: Validate HTML code to correct and optimize your code and html size of your pageAnd many more features: See page cookies, get pixel color on a page, make a page screenshot…DebugBar can be downloaded fromhttp://www.debugbar.com/ and is free for non-commercial use

Problems publishing a browser enabled form using InfoPath 2007

This is a checklist to follow if you are having problems with publishing InfoPath 2007 browser-enabled forms to Microsoft Office SharePoint Server 2007. A typical error message you receive in this case is

“This form template is browser-compatible, but it cannot be browser-enabled on the selected site”

… with an ugly yellow color. Here’s what to check before you’re going crazy:

Install Microsoft Office Forms Server 2007 (independent product) on the SharePoint box if the Office server suite you use is lower than Enterprise (or if you are using Windows SharePoint Services 3.0). The Forms Services support is included in the Enterprise Office Server suite.

After installed Forms Server, you’ll have a InfoPath Forms Services section at the Application Management page. To go here, click on Start -> Administrative Tools -> SharePoint 3.0 Central Administration and choose the Application Management tab on the top of the page. Click on Configure InfoPath Forms Services in the InfoPath Forms Services section and check both “Allow users to browser-enable form templates” and “Render form templates that are browser-enabled by users” checkboxes, then OK this page

Open your SharePoint site, click on Site Actions -> Site Settings, select Site collection features under Site Collection Administration and activate InfoPath Forms Services support

Start designing your form with the InfoPath 2007 client. In InfoPath, click on Tools/Form Options, select the Compatibility category and check the “Design a form template that can be opened in a browser or InfoPath”, then click OK. In the case if you miss this one and your form is browser-compatible, you get a warning message while publishing your form saying that “The server is running InfoPath Forms Services, but the compatibility settings for this form template is InfoPath only”.

Make sure that your form is browser-compatible. You can use the design checker task pane in the InfoPath 2007 client to perform this task.

Publish your form onto a SharePoint 2007 library. In the wizard, at step 3, check the “Enable this form to be filled out by using a browser” checkbox and finish publishing.

At the end of the publishing wizard, select “Open this document library” and click on Close. This will open the document library in the browser. Click on Settings/Form Library Settings, then click on Advanced Settings and select the “Display as a Web page” option in the Browser-enabled Documents category. If you don’t choose this option, the form will be opened in InfoPath if it’s installed on the client. Otherwise, it’s going to be opened in the browser.