SharePoint and Open XML

13
SharePoint and Open XML Using SharePoint as a Data Source for your custom Open XML Documents Presented by Becky Bertram MCSD, MCAD, MCTS www.beckybertram.com

Transcript of SharePoint and Open XML

Page 1: SharePoint and Open XML

SharePoint and Open XMLUsing SharePoint as a Data Source for your custom Open XML Documents

Presented by Becky BertramMCSD, MCAD, MCTS

www.beckybertram.com

Page 2: SharePoint and Open XML

What is Open XML?• New format for Microsoft Office 2007

documents that can be opened as a ZIP file.

• Allows document properties to be stored separately from the information in the document itself.

• Document contents themselves are stored as XML.

Page 3: SharePoint and Open XML

Parts• Provide modularity so you can easily swap

out portions of the document without affecting the document as a whole.

• Some “parts” are common across all Office documents; others are unique to a particular application.

• These XML parts are referenced through “relationship” files (much like a foreign key in a database.)

Page 4: SharePoint and Open XML

Office UI Elements• Ribbon

• Tab

• Add-Ins Tab

Page 5: SharePoint and Open XML

Office UI Elements• Actions Pane

Page 6: SharePoint and Open XML

Scenario• A college professor submits an InfoPath

Form with information regarding next semester’s course.

• Someone from the registrar’s office approves the information submitted.

• The person in charge of creating the course catalog for the semester wants to dynamically generate a Word document based on the information stored in the Form Library.

Page 7: SharePoint and Open XML

VSTOVisual Studio Tools for Office• Included with Visual Studio 2008• VSTO Developer Center on MSDN:

http://msdn.microsoft.com/en-us/vsto/default.aspx

• Office Developer Center on MSDN: http://msdn.microsoft.com/en-us/office/default.aspx

Page 8: SharePoint and Open XML

SharePoint Web ServicesReferenced in the IIS Web Application

of your SharePoint site, in the _vti_bin folder.

Page 9: SharePoint and Open XML

Lists Web Service• Used for carrying out actions on lists.• Could call Lists.GetListItems() Web

Method.• Fields are returned using more of the

Search Column nomenclature (i.e. ows_ColumnName).

• http://msdn.microsoft.com/en-us/library/lists.aspx

Page 10: SharePoint and Open XML

List Data Retrieval Web Service• Based on Data/Adapter methodology of

ADO.NET, Data Controls, etc.• Returns columns as XML elements, where

each element is the name of the column.• http://

msdn.microsoft.com/en-us/library/ms774413.aspx

• http://msdn.microsoft.com/en-us/library/dd586758.aspx

Page 11: SharePoint and Open XML

List Data Retrieval Web ServiceParameters

• View Fields: CAML representation of <ViewFields> to be returned

• Query: CAML Query (such as <Where>)• QueryOptions: Options such as which

record do you want to start with; do you want the results to be returned as elements or attributes; etc.

Page 12: SharePoint and Open XML

Things to Keep in Mind• Unlike coding SharePoint Features and

Solutions that will be deployed right onto a SharePoint server, you’ll need to connect to SharePoint using a Web Service since the user will be access SharePoint from a client machine.

• Pass in the proper credentials to ensure they’ve got the permissions for the SharePoint resource they’re accessing.

Page 13: SharePoint and Open XML

Access and Mail Merge• Create an Access project that references

SharePoint lists• Create a new Word document and start the

Mail Merge process with Access as the data source.

• Reference columns from that SharePoint list in your Word document.